fish-shell/share/functions/__fish_complete_file_url.fish
axel 06688fb9ea Change output format of complete -C to make writing case insensitive command specific completions more transparent
darcs-hash:20070420195506-ac50b-b5f56bb2964e65d13abfb9281ce26db2b8c341b7.gz
2007-04-21 05:55:06 +10:00

20 lines
322 B
Fish

function __fish_complete_file_url
set -l comp
if set -q argv[1]
set comp $argv[1]
else
set comp (commandline -ct)
end
set -l prefix (echo $comp|cut -c 1-7)
if test file:// = $prefix
set -l stripped (echo $comp|cut -c 8-)
printf "%s\n" file://(complete -C"echo $stripped")
else
echo file://
end
end