generated from andy/linux-nixos-hyprland-config-dotfiles
Initial commit
This commit is contained in:
11
home/.config/fish/functions/archive-preview.fish
Normal file
11
home/.config/fish/functions/archive-preview.fish
Normal file
@@ -0,0 +1,11 @@
|
||||
function archive-preview
|
||||
set archive "$argv[1]"
|
||||
set supported_archive_formats tar.gz tar.bz2 tar.xz zip rar 7z
|
||||
|
||||
for format in $supported_archive_formats
|
||||
if string match -q "application/$format" (file -b --mime-type "$archive")
|
||||
ouch list --tree --no "$archive"
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user