diff options
author | Yigit Sever | 2021-11-11 18:36:14 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-11 18:36:14 +0300 |
commit | bcd732aacc6a1bad700c8ceca5974656cbfc3cf2 (patch) | |
tree | dcd115b90a5b54a31d0eecdc2c03053484f0ed25 /.config/fish/functions/take.fish | |
parent | a572a619da2464a234af7500f095c776c5c39df1 (diff) | |
download | dotfiles-bcd732aacc6a1bad700c8ceca5974656cbfc3cf2.tar.gz dotfiles-bcd732aacc6a1bad700c8ceca5974656cbfc3cf2.tar.bz2 dotfiles-bcd732aacc6a1bad700c8ceca5974656cbfc3cf2.zip |
fish: welcome!
diffstat (limited to '.config/fish/functions/take.fish')
-rw-r--r-- | .config/fish/functions/take.fish | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/fish/functions/take.fish b/.config/fish/functions/take.fish new file mode 100644 index 0000000..407cf36 --- /dev/null +++ b/.config/fish/functions/take.fish | |||
@@ -0,0 +1,12 @@ | |||
1 | function take --description 'Create a directory and cd to it' | ||
2 | command mkdir $argv | ||
3 | if test $status = 0 | ||
4 | switch $argv[(count $argv)] | ||
5 | case '-*' | ||
6 | |||
7 | case '*' | ||
8 | cd $argv[(count $argv)] | ||
9 | return | ||
10 | end | ||
11 | end | ||
12 | end | ||