mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 14:53:11 +00:00
c41986a63f
darcs-hash:20061102235727-ac50b-7b7638289be4de52b4e3e3d109ad3167b7285023.gz
21 lines
337 B
Fish
21 lines
337 B
Fish
|
|
function __fish_complete_unrar -d "Peek inside of archives and list all files"
|
|
|
|
set -l cmd (commandline -poc)
|
|
set -e cmd[1]
|
|
for i in $cmd
|
|
switch $i
|
|
case '-*'
|
|
continue
|
|
|
|
case '*.rar'
|
|
if test -f $i
|
|
set -l file_list (unrar vb $i)
|
|
printf (_ "%s\tArchived file\n") $file_list
|
|
end
|
|
return
|
|
end
|
|
end
|
|
end
|
|
|
|
|