aboutsummaryrefslogtreecommitdiffstats
path: root/.zsh.after
diff options
context:
space:
mode:
Diffstat (limited to '.zsh.after')
-rw-r--r--.zsh.after/functions.zsh44
1 files changed, 44 insertions, 0 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh
index e2af147..16dc6de 100644
--- a/.zsh.after/functions.zsh
+++ b/.zsh.after/functions.zsh
@@ -200,6 +200,50 @@ ex2() {
fi
}
+lstar() {
+ if [ -f "$1" ] ; then
+ case "$1" in
+ *.bz2)
+ tar -tvf "$1" --force-local
+ ;;
+ *.gz)
+ tar -tvf "$1" --force-local
+ ;;
+ *.rar)
+ unrar lb "$1"
+ ;;
+ *.tar)
+ tar -tvf "$1" --force-local
+ ;;
+ *.tbz2)
+ tar -tvf "$1" --force-local
+ ;;
+ *.tgz)
+ tar -tvf "$1" --force-local
+ ;;
+ *.xz)
+ tar -Jtvf "$1" --force-local
+ ;;
+ *.zip)
+ unzip -l "$1"
+ ;;
+ *.Z)
+ uncompress $1
+ ;;
+ *.7z)
+ 7z l "$1"
+ ;;
+ *)
+ echo "Don't know how to look into $1"
+ exit 1
+ ;;
+ esac
+ else
+ echo "'$1' is not a file!"
+ exit 1
+ fi
+}
+
## RSYNC
backupinfo() {