Disable shellcheck warning SC2162

pull/1872/head
John Fred Fadrigalan 2021-04-22 02:16:15 +08:00
parent 84bf2b5dc8
commit bbe4f4614d
No known key found for this signature in database
GPG Key ID: 4C23960F72FC911F
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ function alias_completion {
# read in "<alias> '<aliased command>' '<command args>'" lines from defined aliases
local line
while read -r line; do
# shellcheck disable=SC2162
# some aliases do have backslashes that needs to be interpreted
while read line; do
eval "local alias_tokens; alias_tokens=($line)" 2> /dev/null || continue # some alias arg patterns cause an eval parse error
local alias_name="${alias_tokens[0]}" alias_cmd="${alias_tokens[1]}" alias_args="${alias_tokens[2]# }"