====
Save favorite directories and jump to it.
The favdir.sh
is a plugin that save your favorite directorie and jump to it. If you have deep directory structure having a directory in a lower-level layer of a directory, this plugin exerts great power. Saving preliminarily, easily refer to that directory. First of all, try to experience.
It was heavily inspired by bashmark and the likes.
Tested in both.
- Bash 3.2
- Zsh 5.0.2
If you install this script, you will be able to run the following command.
Once you have to be troubled in how to use this script, it is recommended that you type the following command.
$ favdir
By doing so, the use of all commands will be displayed on the screen.
$ reg [name]
Register current directory path as {name}
. If {name}
is omitted, {name}
is set current directory name.
$ pwd
/home/testuser/work/myproject
$ reg
$ show
bin ~/.local/bin
work ~/work
myproject ~/work/myproject
$ reg abc
bin ~/.local/bin
work ~/work
myproject ~/work/myproject
abc ~/work/myproject
$ show [name]
Output g:favdir_filepath
. If {name}
is not omitted, show filepath of {name}
.
$ show
bin ~/.local/bin
work ~/work
$ gg name
Jump to {name}
if {name}
's path is available.
$ pwd
/home/testuser
$ gg abc
$ pwd
/home/testuser/work/myproject
$ del name...
Delete the {name}
s from favdir's filelist.
$ del myproject abc
$ show
bin ~/.local/bin
work ~/work
$ p name
Print {name}
'path
$ p bin
/home/testuser/.local/bin
Download favdir.sh by git
git clone https://github.com/b4b4r07/favdir.git
Put something like this in your $HOME/.bashrc
or $HOME/.zshrc
:
source /path/to/favdir.sh
Copyright (c) 2014 "BABAROT" b4b4r07 Licensed under the MIT license.
b4b4r07 |
The favdir written in Vim script.