Add function __fish_complete_user_at_hosts

This function list hostnames;
if commandline hoge@~ , it list hoge@(hostname)
This commit is contained in:
tamanugi 2017-06-23 00:04:36 +09:00 committed by Fabian Homborg
parent 70c9d78536
commit 170f11771b

View file

@ -0,0 +1,5 @@
function __fish_complete_user_at_hosts -d "Print list host-names with user@"
for user_at in (commandline -ct | string match -r '.*@'; or echo "")(__fish_print_hostnames)
echo $user_at
end
end