cd-bookmark
cd-bookmark copied to clipboard
Add delete command "cd-bookmark -d BOOKMARK_ID"
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).