Feature request - shortcut for current directory
casperl opened this issue · 2 comments
Hi,
I use bashmarks all the time and it is extremely useful to me.
Feature request: a shortcut to set the current directory as a bookmark without typing the name
I would have a list of directories that function as work places I frequently navigate to. Every time I have to set a bashmark as in
cd my-very-long-working-directory
s myverylongworkingdirectory
cd to-where-I-was-before
The shortcut would be to simply state
s cwd
where cwd is the name of the current working directory that is parsed to remove characters that bashmarks do not allow. The cwd can be anything else, it need not be cwd as long as bashmarks recognise it as the current working directory.
A trivial feature, but one that will be useful to some.
Thanks
Just leaving the bookmark name should work?
$ s
and
$ g
I see it currently doesn't work. Doing this following is enough:
Change:
function _bookmark_name_valid {
exit_message=""
if [ -z $1 ]; then
exit_message="bookmark name required"
echo $exit_message
elif [ "$1" != "$(echo $1 | sed 's/[^A-Za-z0-9_]//g')" ]; then
exit_message="bookmark name is not valid"
echo $exit_message
fi
}
To:
function _bookmark_name_valid {
exit_message=""
if [ "$1" != "$(echo $1 | sed 's/[^A-Za-z0-9_]//g')" ]; then
exit_message="bookmark name is not valid"
echo $exit_message
fi
}