summaryrefslogtreecommitdiff
path: root/etc/.zshrc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-11-22 09:15:07 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-11-22 09:15:07 +0100
commit88ed4809398dce676ba516e2016f8b51d53b4720 (patch)
tree1073cd866eb10ac2b5111a8784403ccbff5e9246 /etc/.zshrc
parent244de02d830c9a42bd423715b3c8031ade2fa702 (diff)
function cleanup
Diffstat (limited to 'etc/.zshrc')
-rw-r--r--etc/.zshrc32
1 files changed, 32 insertions, 0 deletions
diff --git a/etc/.zshrc b/etc/.zshrc
index 98a07d8..e6c5777 100644
--- a/etc/.zshrc
+++ b/etc/.zshrc
@@ -185,6 +185,38 @@ function ondemand powersave performance conservative userspace {
sudo cpufreq-set -c 0 -g ${0}
}
+function extract {
+ if [[ -f ${1} ]] {
+ case ${1} in
+ *.tar*) tar xvf ${*} ;;
+ *.ace) unace e ${1} ;;
+ *.rar) unrar x ${1} ;;
+ *.deb) ar -x ${1} ;;
+ *.bz2) bunzip2 ${1} ;;
+ *.lzh) lha x ${1} ;;
+ *.gz) gunzip ${1} ;;
+ *.tar) tar xvf ${*} ;;
+ *.zip) unzip ${1} ;;
+ *.Z) uncompress ${1} ;;
+ *.cpio) cpio --no-absolute-filenames -idv < ${1} ;;
+ *.lzma) unlzma ${1} ;;
+ *) echo "Unknown archive type: ${1}"; return 2 ;;
+ esac
+ } else {
+ echo "No such file: ${1}"
+ return 1
+ }
+}
+
+function mkcd {
+ mkdir -p ${1}
+ cd ${1}
+}
+
+function world-readable {
+ chmod -R a+rX .
+}
+
# }}}
# {{{ ZLE