aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc/S50_functions
diff options
context:
space:
mode:
Diffstat (limited to 'files/.zsh/rc/S50_functions')
-rw-r--r--files/.zsh/rc/S50_functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions
index b9bd045..f510bd3 100644
--- a/files/.zsh/rc/S50_functions
+++ b/files/.zsh/rc/S50_functions
@@ -1,6 +1,7 @@
mcd() {
- mkdir -p "$1" && cd "$1"
+ [ $# = 1 ] && mkdir -p -- "$1" && cd -- "$1"
}
+compdef _directories mcd
ppgrep() {
pgrep "$@" | xargs --no-run-if-empty ps fp