Compare commits
No commits in common. "b9c4ea7c77efd81584bac2d4c5c2b99dd22a469f" and "7543cca7d6b06d57ec5c802a1bab082339552711" have entirely different histories.
b9c4ea7c77
...
7543cca7d6
1 changed files with 97 additions and 104 deletions
21
bemoji
21
bemoji
|
|
@ -61,7 +61,7 @@ version() {
|
||||||
}
|
}
|
||||||
|
|
||||||
msg() {
|
msg() {
|
||||||
# Outputs a message to stderr, to be used for info, warning and error messages.
|
# Outputs a message to stderr, to be used for info, warning and error messages.
|
||||||
printf "%s\n" "$1" >&2
|
printf "%s\n" "$1" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,7 +175,7 @@ dl_nerd_symbols() {
|
||||||
local nerd all
|
local nerd all
|
||||||
nerd=$(curl -sSL "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/css/nerd-fonts-generated.css")
|
nerd=$(curl -sSL "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/css/nerd-fonts-generated.css")
|
||||||
all+=$(printf "%s" "$nerd" | sed -ne '/\.nf-/p' -e '/\s*[^_]content:/p' | sed -e 'N;s/^\.nf-\(.*\):before.* content: \"\\\(.*\)\";/\\U\2 \1/')
|
all+=$(printf "%s" "$nerd" | sed -ne '/\.nf-/p' -e '/\s*[^_]content:/p' | sed -e 'N;s/^\.nf-\(.*\):before.* content: \"\\\(.*\)\";/\\U\2 \1/')
|
||||||
echo -e "$all" >"$bm_db_location/nerdfont.txt"
|
echo -e "$all" > "$bm_db_location/nerdfont.txt"
|
||||||
msg "Downloaded nerdfont symbols set."
|
msg "Downloaded nerdfont symbols set."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -287,14 +287,6 @@ 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
|
||||||
|
|
@ -303,20 +295,21 @@ 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
|
||||||
printout "$result" | ${bm_default_cmd[@]}
|
echo "$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
|
||||||
printout "$result" | "$cmd"
|
[ "$bm_echo_newline" = true ] && echo_opts= || echo_opts=-n
|
||||||
|
echo $echo_opts "$result" | "$cmd"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
10)
|
10)
|
||||||
printout "$result" | _clipper
|
echo "$result" | _clipper
|
||||||
;;
|
;;
|
||||||
11)
|
11)
|
||||||
printout "$result" | _typer
|
echo "$result" | _typer
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue