Compare commits
2 commits
7543cca7d6
...
b9c4ea7c77
| Author | SHA1 | Date | |
|---|---|---|---|
| b9c4ea7c77 | |||
| 155114aaec |
1 changed files with 104 additions and 97 deletions
17
bemoji
17
bemoji
|
|
@ -287,6 +287,14 @@ exit_value="$?"
|
||||||
[ "$bm_private_mode" = true ] || add_to_recent "$result"
|
[ "$bm_private_mode" = true ] || add_to_recent "$result"
|
||||||
result=$(echo "$result" | grep -o '^\S\+' | tr -d '\n')
|
result=$(echo "$result" | grep -o '^\S\+' | tr -d '\n')
|
||||||
|
|
||||||
|
printout() { # $1=emoji
|
||||||
|
if [ "$bm_echo_newline" = true ]; then
|
||||||
|
printf "%s\n" "$*"
|
||||||
|
else
|
||||||
|
printf "%s" "$*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
case "$exit_value" in
|
case "$exit_value" in
|
||||||
1)
|
1)
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -295,21 +303,20 @@ case "$exit_value" in
|
||||||
if [ ${#bm_cmds[@]} -eq 0 ]; then
|
if [ ${#bm_cmds[@]} -eq 0 ]; then
|
||||||
if [ -n "$bm_default_cmd" ]; then
|
if [ -n "$bm_default_cmd" ]; then
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
echo "$result" | ${bm_default_cmd[@]}
|
printout "$result" | ${bm_default_cmd[@]}
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
bm_cmds+=(_clipper)
|
bm_cmds+=(_clipper)
|
||||||
fi
|
fi
|
||||||
for cmd in "${bm_cmds[@]}"; do
|
for cmd in "${bm_cmds[@]}"; do
|
||||||
[ "$bm_echo_newline" = true ] && echo_opts= || echo_opts=-n
|
printout "$result" | "$cmd"
|
||||||
echo $echo_opts "$result" | "$cmd"
|
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
10)
|
10)
|
||||||
echo "$result" | _clipper
|
printout "$result" | _clipper
|
||||||
;;
|
;;
|
||||||
11)
|
11)
|
||||||
echo "$result" | _typer
|
printout "$result" | _typer
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue