cd-bookmark icon indicating copy to clipboard operation
cd-bookmark copied to clipboard

Add delete command "cd-bookmark -d BOOKMARK_ID"

Open erikw opened this issue 4 years ago • 0 comments

It would be convenient to be able to delete a bookmark by name from the cli tool.

As I migrated from huyng/bashmarks, I have aliases like

alias g='cd-bookmark -c'
alias s='cd-bookmark -a'
alias l='cd-bookmark -l'
alias e='cd-bookmark -e'
alias p='cd-bookmark -p'

Thus, to get the delete feature I have made myself a

function d() {
	local name="$1"
	sed -i "/^${name}|/d" ${CD_BOOKMARK_FILE:-$HOME/.cdbookmark}
}

However it would be a lot nicer if we had a

$ cd-bookmark -d BOOKMARK_ID

command! (then I could just do alias d='cd-bookmark -d).

erikw avatar Oct 28 '21 16:10 erikw