Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting up Apparix for directory bookmarks on Mac OS X
brew install -v apparix
# Installed to: /opt/foo/Cellar/apparix/11-0/bin/apparix
# Add bm/to Bash functions from man page to .bashrc or .local.bash:
man -P cat apparix | awk '/BASH-style functions/{p=1} /---/{if(p==1)p=2; else p=0; next} p>1{print}' >> ~/.local.bash
# Reload my bash config:
source ~/.local.bash
# Now create a bookmark:
cd ~/src/myproject
bm prj
# Go to my project:
to prj
# View my shortcuts
# or: cat ~/.apparixrc

This comment has been minimized.

Copy link
Owner Author

@glombard glombard commented Dec 2, 2014

It's handy to use $(apparix bookmark-name) in the shell, like I've got a st function in my bash script to easily open any bookmarked git repo in SourceTree:

function st () {
  if [ -z "$1" ]
    echo "Please specify which bookmark to open in SourceTree."
    open $(apparix $1) -a sourcetree

Now I can open any bookmarked git repo in SourceTree with st projectname...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.