sldir
is a handy command line tool for unix-like systems to save and load frequently visited directories.
s0
tos9
: Save directories;l0
tol9
: Load directories;d0
tod9
: Delete saves;sl
: Print all saved directories.
Examples:
-
Save current directory to slot 1:
$ s1
-
Load directory saved at slot 1:
$ l1
-
Delete record saved at slot 1:
$ d1
-
Save current directory to slot 2:
$ s2
-
Load directory saved at slot 2:
$ l2
-
Delete record saved at slot 2:
$ d2
-
Print all saved directories:
$ sl
An example output looks like this:
sdir name
: Save current directory to the given slotname
;ldir name
: Load directory saved atname
slot;ddir name
: Delete save saved atname
slot;sldir
: Same assl
, print all saved directories.
Examples:
-
Save current directory to slot
work
:$ sdir work
-
Load directory saved at slot
work
:$ ldir work
-
Delete record saved at slot
work
:$ ddir work
-
Print all saved directories:
$ sldir
- Copy and paste the following command and run it in your terminal to quickly install:
git clone https://github.com/ZhouShengsheng/sldir.git /tmp/sldir && cd /tmp/sldir && bash install.sh && cd - && rm -rf /tmp/sldir
- Restart your terminal or
source ~/.bash_profile
or~/.zshrc
.
If the quick installation failed, you might need to try the following manual installation.
- Clone the repository:
git clone --depth 1 https://github.com/ZhouShengsheng/sldir.git
- Run the
install.sh
script:
cd sldir
./install.sh
-
Restart your terminal or
source ~/.bash_profile
or~/.zshrc
. -
(Optional) Clean up:
cd ..
rm -rf sldir
- Bash
- Zsh
sldir
is released under the MIT license. See LICENSE for details.