summary refs log tree commit diff stats
path: root/.config
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.dev>2020-07-06 02:23:41 -0400
committerBenjamin Morrison <ben@gbmor.dev>2020-07-06 02:23:41 -0400
commit8d7c73bf80a6464d5ecef832b60983eed8460b80 (patch)
tree436045580e9a7f78cec01c7184a3b194ded90c15 /.config
parent9b9819220df8756821814c7dee9719de77c1773b (diff)
downloaddogfiles-8d7c73bf80a6464d5ecef832b60983eed8460b80.tar.gz
dev directory shortcuts are more ergonomic
can specify a subdirectory. moved common logic to a separate function as
well
Diffstat (limited to '.config')
-rw-r--r--.config/fish/config.fish29
1 files changed, 15 insertions, 14 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
index a952c4e..0dcb720 100644
--- a/.config/fish/config.fish
+++ b/.config/fish/config.fish
@@ -46,35 +46,36 @@ function python
 end
 
 # some   commandes for cd use
+function dev_cd
+  if [ "$argv[2]" = "" ]
+    cd "$argv[1]"
+  else
+    cd "$argv[1]/$argv[2]"
+  end
+end
 function devg
-  cd ~/dev/github/
+  dev_cd ~/dev/github "$argv"
 end
 function devgg
-  cd ~/dev/github/gbmor
+  dev_cd ~/dev/github/gbmor "$argv"
 end
 function devggf
-  cd ~/dev/github/gbmor-forks
+  dev_cd ~/dev/github/gbmor-forks "$argv"
 end
 function devgi
-  cd ~/dev/github/tildeinstitute
-end
-function devgl
-  cd ~/dev/gitlab
-end
-function devk
-  cd ~/dev/keybase
+  dev_cd ~/dev/github/tildeinstitute "$argv"
 end
 function devs
-  cd ~/dev/srht
+  dev_cd ~/dev/srht "$argv"
 end
 function devsg
-  cd ~/dev/srht/gbmor
+  dev_cd ~/dev/srht/gbmor/ "$argv"
 end
 function devt
-  cd ~/dev/tmp
+  dev_cd ~/dev/tmp "$argv"
 end
 function devtilde
-  cd ~/dev/tildegit
+  dev_cd ~/dev/tildegit "$argv"
 end
 
 # misc environment modifications