aboutsummaryrefslogtreecommitdiff
path: root/.config/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh/.zshrc')
-rw-r--r--.config/zsh/.zshrc16
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index 133d581..6bf58d9 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -277,6 +277,16 @@ cd() {
fi
}
+# cd into $XDG_CONFIG_HOME/$1 directory
+c() {
+ local root=${XDG_CONFIG_HOME:-~/.config}
+ local dname="$root/$1"
+ if [[ ! -d "$dname" ]]; then
+ return
+ fi
+ cd "$dname"
+}
+
# Back up a file. Usage "backupthis <filename>"
backupthis() {
cp -riv $1 ${1}-$(date +%Y%m%d%H%M).backup;
@@ -375,6 +385,12 @@ extract () {
fi
}
+# Time aliases
+alias ber='TZ=Europe/Berlin date'
+alias nyc='TZ=America/New_York date'
+alias sfo='TZ=America/Los_Angeles date'
+alias utc='TZ=Etc/UTC date'
+
### Dotfiles
alias config='git --git-dir=$HOME/.cfg --work-tree=$HOME'