diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-06-29 02:00:44 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-06-29 02:00:44 +0200 |
| commit | e0cdfda00dcfda3919258a9e8f08244f73edc827 (patch) | |
| tree | eaa5ec08b0f237bd3ad5b6893e5870502261d51e /.config | |
| parent | c091e6b13db2b5ac6bdb0ff9a0fa80bed266a137 (diff) | |
| download | dotfiles-e0cdfda00dcfda3919258a9e8f08244f73edc827.tar.gz dotfiles-e0cdfda00dcfda3919258a9e8f08244f73edc827.zip | |
Add c() to cd into .config
Diffstat (limited to '.config')
| -rw-r--r-- | .config/zsh/.zshrc | 16 |
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' |
