trim newline from cut

This commit is contained in:
Jes Olson 2022-10-04 14:04:55 -05:00
parent a234c4c5c3
commit 0c67bb1637

2
shmoji
View file

@ -29,7 +29,7 @@ case "$cmd" in
command -v bemenu > /dev/null || die 'bemenu not found' command -v bemenu > /dev/null || die 'bemenu not found'
command -v wtype > /dev/null || die 'wtype not found' command -v wtype > /dev/null || die 'wtype not found'
emoji=$(cat "$emojidb/emojis.txt" | bemenu -c -W 0.2 -l 20) emoji=$(cat "$emojidb/emojis.txt" | bemenu -c -W 0.2 -l 20)
printf "%s" "$emoji" | cut -d " " -f 1 | wtype - printf "%s" "$emoji" | cut -d " " -f 1 | tr -d '\n' | wtype -
;; ;;
*) *)
printf "%s\n" "usage: shmoji [bemenu | download]" printf "%s\n" "usage: shmoji [bemenu | download]"