INNER CODE UNIT · Python
__vsearch_current_command
torognes/vsearch · completion/scripts/gen_fish.py:26
function __vsearch_current_command --description 'Echo the action flag on the line, if any'
set -l cmds {COMMANDS_SPACE_SEPARATED}
for word in (commandline -opc)
if contains -- $word $cmds
echo $word
return 0
end
end
return 1
end
function __vsearch_no_command
not __vsearch_current_command >/dev/null 2>&1
end
function __vsearch_command_is --argument-names cmd
set -l current (__vsearch_current_command 2>/dev/null)
or return 1