bashmarks icon indicating copy to clipboard operation
bashmarks copied to clipboard

To use it in my zsh

Open xviubu opened this issue 12 years ago • 3 comments

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

xviubu avatar Jun 18 '13 15:06 xviubu

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

briancline avatar Nov 01 '13 04:11 briancline

I,ll try !

xviubu avatar Nov 10 '13 17:11 xviubu

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

bachya avatar May 15 '14 22:05 bachya