2007-04-18 22:46:11 +00:00
|
|
|
|
|
|
|
function __fish_complete_file_url
|
2016-11-28 05:27:22 +00:00
|
|
|
set -l comp
|
2007-04-18 22:46:11 +00:00
|
|
|
|
2016-11-28 05:27:22 +00:00
|
|
|
if set -q argv[1]
|
|
|
|
set comp $argv[1]
|
|
|
|
else
|
|
|
|
set comp (commandline -ct)
|
|
|
|
end
|
2007-04-18 22:46:11 +00:00
|
|
|
|
2016-11-28 05:27:22 +00:00
|
|
|
set -l prefix (echo $comp|cut -c 1-7)
|
2007-04-18 22:46:11 +00:00
|
|
|
|
2016-11-28 05:27:22 +00:00
|
|
|
if test file:// = $prefix
|
|
|
|
set -l stripped (echo $comp|cut -c 8-)
|
|
|
|
printf "%s\n" file://(complete -C"echo $stripped")
|
|
|
|
else
|
|
|
|
echo file://
|
|
|
|
end
|
2007-04-18 22:46:11 +00:00
|
|
|
|
2007-04-20 19:55:06 +00:00
|
|
|
end
|