Skip to content

Conversation

@xviubu
Copy link

@xviubu xviubu commented Jun 18, 2013

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' .

@briancline
Copy link

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

@xviubu
Copy link
Author

xviubu commented Nov 10, 2013

I,ll try !

@bachya
Copy link

bachya commented May 15, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants