mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:54:04 +08:00
c41986a63f
darcs-hash:20061102235727-ac50b-7b7638289be4de52b4e3e3d109ad3167b7285023.gz
22 lines
337 B
Fish
22 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
|
|
|
|
|