dotfiles/private_dot_config/private_fish/functions/_pisces_complete.fish
2023-04-30 01:21:51 +03:00

14 lines
434 B
Fish

function _pisces_complete -d "Invokes complete with modification for vars before a closing double quote"
if commandline --paging-mode
down-or-search
else
set token (commandline -t)
# checking that the current token ends on a $var + '"'
if [ (string match -r '\$.*"$' -- "$token") ]
commandline -f delete-char # which is '"'
end
commandline -f complete
end
end