Skip to content

Commit

Permalink
make: update lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Dec 16, 2021
1 parent caa77bc commit 7e26dcd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -284,6 +284,7 @@
- util: fix leak variables `buff`, `trap`, `{x,y}{1,2}` `#D1572` 5967d6c
- util: fix leak variables `#D1643` fcf634b
- edit (`command-help`): use `ble/util/assign/.mktmp` to determine the temporary filename `#D1663` 1af0800
- make: update lint check `#D1709` 0000000

<!---------------------------------------------------------------------------->
# ble-0.4.0-devel2
Expand Down
6 changes: 3 additions & 3 deletions lib/core-complete.sh
Expand Up @@ -1910,7 +1910,7 @@ function ble/complete/source:command/gen {
if local rex='^\[([0-9]+)\]'; [[ ${joblist[i]} =~ $rex ]]; then
joblist[i]=%${BASH_REMATCH[1]}
else
unset -v 'joblist[i]'
builtin unset -v 'joblist[i]'
fi
done
joblist=("${joblist[@]}")
Expand Down Expand Up @@ -3251,7 +3251,7 @@ function ble/complete/mandb/initialize-manpath {
ble/string#split manpath : "$manpath"
if ((${#manpath[@]}==0)); then
local -a manpath_mandatory=()
builtin eval "${_ble_util_dict_declare//NAME/manpath_map}"
builtin eval -- "${_ble_util_dict_declare//NAME/manpath_map}"
ble/complete/mandb/load-mandb-conf /etc/man_db.conf
ble/complete/mandb/load-mandb-conf ~/.manpath

Expand All @@ -3267,7 +3267,7 @@ function ble/complete/mandb/initialize-manpath {
done
fi

builtin eval "${_ble_util_dict_declare//NAME/mark}"
builtin eval -- "${_ble_util_dict_declare//NAME/mark}"

local paths path ret
ble/string#split paths : "$PATH"
Expand Down
2 changes: 1 addition & 1 deletion lib/test-util.sh
Expand Up @@ -1403,7 +1403,7 @@ ble/test ble/util/is-running-in-subshell exit=1
ble/util/getpid
ble/test '[[ $BASHPID != $$ ]]'
getpid
ble/test '[[ $BASHPID == $ppid ]]'
ble/test code:'ret=$BASHPID' ret="$ppid"
pid1=$BASHPID
(
dummy=modification_to_environment.2
Expand Down
5 changes: 4 additions & 1 deletion make_command.sh
Expand Up @@ -1095,7 +1095,7 @@ function sub:scan/list-command {
function sub:scan/builtin {
echo "--- $FUNCNAME $1 ---"
local command=$1 esc='(\[[ -?]*[@-~])*'
sub:scan/list-command --exclude-this --exclude={generate-release-note.sh,lib/test-*.sh} "$command" "${@:2}" |
sub:scan/list-command --exclude-this --exclude={generate-release-note.sh,lib/test-*.sh,make,ext} "$command" "${@:2}" |
grep -Ev "$rex_grep_head([[:space:]]*|[[:alnum:][:space:]]*[[:space:]])#|(\b|$esc)(builtin|function)$esc([[:space:]]$esc)+$command(\b|$esc)" |
grep -Ev "$command(\b|$esc)=" |
grep -Ev "ble\.sh $esc\($esc$command$esc\)$esc" |
Expand Down Expand Up @@ -1227,6 +1227,7 @@ function sub:scan {
sed -E 'h;s/'"$esc"'//g;s/^[^:]*:[0-9]+:[[:space:]]*//
\Z\bstty[[:space:]]+echoZd
\Zecho \$PPIDZd
\Zmandb-help=%'\''help echo'\''Zd
g'
#sub:scan/builtin '(compopt|type|printf)'
sub:scan/builtin 'bind' |
Expand All @@ -1235,6 +1236,7 @@ function sub:scan {
\Zline = "bind"Zd
\Z'\'' bindZd
\Z\(bind\) ble-bindZd
\Zble/cmdspec/opts .* bind$Zd
g'
sub:scan/builtin 'read' |
sed -E 'h;s/'"$esc"'//g;s/^[^:]*:[0-9]+:[[:space:]]*//
Expand All @@ -1256,6 +1258,7 @@ function sub:scan {
\Ztext = "eval -- \$'\''Zd
\Zcmd '\''eval -- %q'\''Zd
\Z\$\(eval \$\(call .*\)\)Zd
\Z^[[:space:]]*local rex_[a-zA-Z0-9_]+='\''[^'\'']*'\''[[:space:]]*$Zd
g'
sub:scan/builtin 'unset' |
sed -E 'h;s/'"$esc"'//g;s/^[^:]*:[0-9]+:[[:space:]]*//
Expand Down
2 changes: 1 addition & 1 deletion src/util.sh
Expand Up @@ -5741,7 +5741,7 @@ function ble/term/CPR/request.draw {
function ble/term/CPR/notify {
local hook=${_ble_term_CPR_hook[0]}
ble/array#shift _ble_term_CPR_hook
[[ ! $hook ]] || builtin eval "$hook $1 $2"
[[ ! $hook ]] || builtin eval -- "$hook $1 $2"
}

#---- SGR(>4): modifyOtherKeys ------------------------------------------------
Expand Down

0 comments on commit 7e26dcd

Please sign in to comment.