Quickly navigate your filesystem
The article is a great tip for those who spend a good chunk of the working day on the command line. I made some adjustments to Bash completion code to get it to work on Mac OS X:
Original:
\_completemarks() { local
curw=${COMP_WORDS[COMP_CWORD]}
local wordlist=$(find
$MARKPATH -type l -printf "%f\n")
COMPREPLY=($(compgen -W
'${wordlist[@]}' -- "$curw")) return 0 }
complete -F \_completemarks jump unmark
My modified version (tested on Mac OS X and Ubuntu):
\_completemarks() { local curw=${COMP_WORDS[COMP_CWORD]}
local wordlist=(`find $MARKPATH -type l | cut -d / -f 5`)
COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw")) return 0 }
complete -F \_completemarks jump unmark