aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/portmanteau
blob: a3788c8b9ee0ac823718aee266e662854a079d6c (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh -eu
word=$(diceware --no-caps --num 2 --delimiter " ")
first=${word%??? *}
second=${word#* ???}

# TODO: Maybe manipulate adjacent consonants and vowels at the word merge boundary.
# barric[ade] [hea]dlock
# barri[cd]lock -> barrilock

printf '%s\n%s%s\n' "$word" "$first" "$second"