To use it in my zsh
When i use it in my zsh,I found some command conflicts,i guess others face this problem, so i change all command to add prefix 'bm' .
I like the idea of allowing flexibility, but I also really like the one-letter default commands. Have you considered revising this patch to instead set a bashmarks prefix var (if one isn't already set in the sourcing environment), and defaulting it to an empty value to preserve the existing commands for everyone else?
Perhaps something like this:
BASHMARKS_DEFAULT_PREFIX=""
BASHMARKS_PREFIX=${BASHMARKS_PREFIX:-$BASHMARKS_DEFAULT_PREFIX}
function bashmarks_s {
...
}
alias ${BASHMARKS_PREFIX}s=bashmarks_s
...
Then, in your .zshrc, all you'd need is this:
export BASHMARKS_PREFIX="bm"
source ~/.local/bin/bashmarks.sh
I,ll try !
The solution proposed by @briancline is a very elegant one. I've submitted a pull request, but I'm not sure how active this repo is anymore; in case you're interested, my fork has this update: https://github.com/bachya/bashmarks