A simple shell tool that enables file system location aliasing and navigation.
brew tap seifkamal/tap
brew install nav
Note: Depending on the state of your .bash_profile
, you may need to manually source the script.
You'll be prompted by brew if you need to do so.
Download the script and source it in your .bash_profile
.
Example:
(cd && curl -OJ https://raw.githubusercontent.com/seifkamal/nav/master/nav.sh)
echo "source nav.sh" >> ~/.bash_profile
$ nav help
Available actions:
- pin (Usage: nav pin [location] (alias))
- to (Usage: nav to [alias])
- rm (Usage: nav rm [alias])
- list
- which
- which-conf
Assigns an alias to the given directory.
$ nav pin . someapp
Pinned /Users/seifkamal/SomeApplication as 'someapp'
Navigates to the location associated with the given alias.
$ nav to someapp
Moved to /Users/seifkamal/SomeApplication
Lists all available location aliases.
$ nav list
desktop /Users/seifkamal/Desktop
nav /Users/seifkamal/projects/nav
someapp /Users/seifkamal/SomeApplication
Removes the given location alias.
$ nav rm someapp
Removed location with alias 'someapp'