c24928815179e1a8e1e3a0a4ab130e22ba2e0f1a

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

feat(lib): add `mkcd` as equivalent to `takedir` (#9749)

Fixes #9749

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index 9cc735196c6d8e2ce40f29bd7194ff65449d827e..24b7254fbea6311dbbc62c14921d2d37f2e9d529 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -13,10 +13,6 @@ function upgrade_oh_my_zsh() {
 6   omz update
 7 }
 8 
 9-function takedir() {
10-  mkdir -p $@ && cd ${@:$#}
11-}
12-
13 function open_command() {
14   local open_cmd
15 
16@@ -37,6 +33,13 @@ function open_command() {
17   ${=open_cmd} "$@" &>/dev/null
18 }
19 
20+# take functions
21+
22+# mkcd is equivalent to takedir
23+function mkcd takedir() {
24+  mkdir -p $@ && cd ${@:$#}
25+}
26+
27 function takeurl() {
28   data=$(mktemp)
29   curl -L $1 > $data