summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-11-26 13:53:23 +0200
committerSyndamia <kamen@syndamia.com>2022-11-26 13:53:23 +0200
commitbf80dd397748c768b13d02996a0852edc5272785 (patch)
tree05c84867c1e6f42cb4d1a294e41cea9eabd8b0fa /.zshrc
parent15cd9435651eb31454b6747900c8246a8aeb573d (diff)
downloaddotfiles-bf80dd397748c768b13d02996a0852edc5272785.tar
dotfiles-bf80dd397748c768b13d02996a0852edc5272785.tar.gz
dotfiles-bf80dd397748c768b13d02996a0852edc5272785.zip
[zshrc] Renamed cr to cdrepo and fixed its implementation
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc19
1 files changed, 8 insertions, 11 deletions
diff --git a/.zshrc b/.zshrc
index 577eba5..45695a7 100644
--- a/.zshrc
+++ b/.zshrc
@@ -53,6 +53,8 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an
autoload -U select-word-style
select-word-style bash
+ # autoloads completion files
+ # Note: remove all ~/.zcompdump files in case something doesn't autoload
autoload -U compinit
compinit
# }}}
@@ -174,9 +176,9 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an
fi
if [[ $device != "server" ]]; then
- alias cdg="cr GitHub-repos"
- alias cdl="cr GitLab-repos"
- alias cds="cr source"
+ alias cdg="cdrepo GitHub-repos"
+ alias cdl="cdrepo GitLab-repos"
+ alias cds="cdrepo source"
else
alias wudo="sudo -u www-data"
@@ -222,14 +224,9 @@ device='desktop' # can be either "desktop" (default when empty), "server" or "an
}
if [[ $device != "server" ]]; then
- cr () {
- case "$1" in
- l) cd '~/Programming/GitLab-repos/' ;;
- g) cd '~/Programming/GitHub-repos/' ;;
- s) cd '~/Programming/source/' ;;
- *) return 0 ;;
- esac
- [ -n "$1" ] && cd "$1" || return 0
+ cdrepo () {
+ cd "~/Programming/$1"
+ [ -n "$2" ] && cd "$2" || return 0
}
fi