文件操作 - __fish_complete_tar.fish
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/fish/functions/__fish_complete_tar.fish
编辑文件内容
function __fish_complete_tar -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 '*.tar.bz' '*.tar.bz2' '*.tbz' '*.tbz2' if test -f $i set -l file_list (tar -jt <$i) printf (_ "%s\tArchived file\n") $file_list end return case '*.tar.gz' '*.tgz' if test -f $i set -l file_list (tar -it <$i) printf (_ "%s\tArchived file\n") $file_list end return case '*.tar' if test -f $i set -l file_list (tar -t <$i) printf (_ "%s\tArchived file\n") $file_list end return end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件