Skip to content

Add delete command "cd-bookmark -d BOOKMARK_ID" #4

@erikw

Description

@erikw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions