fix:修复BUG/升级1.1.6版本
This commit is contained in:
@@ -11,13 +11,14 @@ _sf_{{ COMMAND_NAME }}() {
|
||||
local sf_cmd="${COMP_WORDS[0]}"
|
||||
|
||||
# for an alias, get the real script behind it
|
||||
if [[ $(type -t $sf_cmd) == "alias" ]]; then
|
||||
sf_cmd_type=$(type -t $sf_cmd)
|
||||
if [[ $sf_cmd_type == "alias" ]]; then
|
||||
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
|
||||
else
|
||||
elif [[ $sf_cmd_type == "file" ]]; then
|
||||
sf_cmd=$(type -p $sf_cmd)
|
||||
fi
|
||||
|
||||
if [ ! -x "$sf_cmd" ]; then
|
||||
if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user