Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created February 4, 2022 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/da935263f4a401740f232d55606a93f9 to your computer and use it in GitHub Desktop.
Save tommorris/da935263f4a401740f232d55606a93f9 to your computer and use it in GitHub Desktop.
use emacs projectile known projects list for command line project switching
#!/bin/bash
# alias in your zshrc as
# alias prj="source ~/bin/_prj"
DIR=`cat ~/.emacs.d/.local/cache/projectile.projects | sed 's/" "/\n/g' | sed 's/[\"\(\)]//g' | fzf | xargs -n 1 python -c 'import os, sys; print(os.path.expanduser(sys.argv[1]))'`
cd $DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment