🦊 Ensure function variables are declared local
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
65efc27dfc
commit
1b5e9c1284
1 changed files with 5 additions and 3 deletions
8
bemoji
8
bemoji
|
|
@ -180,6 +180,7 @@ dl_nerd_symbols() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gather_emojis() {
|
gather_emojis() {
|
||||||
|
local result
|
||||||
if [ -n "$BEMOJI_CUSTOM_LIST" ] && [ -f "$BEMOJI_CUSTOM_LIST" ]; then
|
if [ -n "$BEMOJI_CUSTOM_LIST" ] && [ -f "$BEMOJI_CUSTOM_LIST" ]; then
|
||||||
result=$(cat "$BEMOJI_CUSTOM_LIST")
|
result=$(cat "$BEMOJI_CUSTOM_LIST")
|
||||||
elif [ -n "$BEMOJI_CUSTOM_LIST" ] && curl -fsSI "$BEMOJI_CUSTOM_LIST" >/dev/null 2>&1; then
|
elif [ -n "$BEMOJI_CUSTOM_LIST" ] && curl -fsSI "$BEMOJI_CUSTOM_LIST" >/dev/null 2>&1; then
|
||||||
|
|
@ -197,12 +198,12 @@ gather_emojis() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_most_recent() {
|
get_most_recent() {
|
||||||
limit=${1}
|
local limit=${1}
|
||||||
recent_file="$bm_history_file"
|
local recent_file="$bm_history_file"
|
||||||
if [ ! -f "$recent_file" ]; then
|
if [ ! -f "$recent_file" ]; then
|
||||||
touch "$recent_file"
|
touch "$recent_file"
|
||||||
fi
|
fi
|
||||||
# TODO improve this messy line
|
# TODO: improve this messy line
|
||||||
local result
|
local result
|
||||||
result=$(sed -e '/^$/d' "$recent_file" |
|
result=$(sed -e '/^$/d' "$recent_file" |
|
||||||
sort |
|
sort |
|
||||||
|
|
@ -244,6 +245,7 @@ _clipper() {
|
||||||
|
|
||||||
# Set default typing util
|
# Set default typing util
|
||||||
_typer() {
|
_typer() {
|
||||||
|
local totype
|
||||||
totype=$(cat -)
|
totype=$(cat -)
|
||||||
|
|
||||||
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue