summary refs log tree commit diff stats
path: root/tag-zsh/config/zsh
diff options
context:
space:
mode:
authorAlan Pearce2016-09-28 17:02:43 +0200
committerAlan Pearce2016-09-28 17:02:43 +0200
commit1a8e7c9478f9d5f7190cf59458193f3303650b11 (patch)
treec4a19c8e46fc90a423f4d37503ee66436eb2ec33 /tag-zsh/config/zsh
parentebdd9dd556f590a0f2d6e645555292d05d5533ee (diff)
downloadnixfiles-1a8e7c9478f9d5f7190cf59458193f3303650b11.tar.lz
nixfiles-1a8e7c9478f9d5f7190cf59458193f3303650b11.tar.zst
nixfiles-1a8e7c9478f9d5f7190cf59458193f3303650b11.zip
zsh: Add function to open project from PWD or arg
Diffstat (limited to 'tag-zsh/config/zsh')
-rw-r--r--tag-zsh/config/zsh/zshrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc
index a816879d..a133a7da 100644
--- a/tag-zsh/config/zsh/zshrc
+++ b/tag-zsh/config/zsh/zshrc
@@ -24,6 +24,13 @@ fi
 
 export EDITOR=emacsclient
 alias ec=emacsclient
+alias open-project=projectile
+_emacs_function () {
+	emacsclient -e "($1 \"$2\")" > /dev/null
+}
+projectile () {
+	_emacs_function projectile-switch-project-by-name ${1:-$PWD}
+}
 
 ls='\ls'
 gnu_ls_options="-v --group-directories-first --color=auto"