ueokande / hop

Hops to your favorite and frequently used directories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hop

Hop is a command to navigates to your favorite and frequently used directory. Change the current directory with a short name.

Screenshot

Install and settings

Clone cds repository to a directory $HOME/.hop:

git clone https://github.com/ueokande/hop $HOME/.hop

Update hop entries in your .bash_profile, .zprofile, or .profile:

# Register your workspaces
[ -x $HOME/.hop/hop-update.sh ] && $HOME/.hop/hop-update.sh \
  ~/go/src/github.com/ueokande \
  ~/workspace \
  /usr/src

The entries are registered into hop-update.sh in simple format. You can register additional entries yourself:

cat >>$HOME/.hoprc <<EOF
Asia=/usr/share/zoneinfo/Asia
Africa=/usr/share/zoneinfo/Africa
EOF

Note that you need to register them after hop-update.sh invocation, since hop-update.sh truncates .hoprc.

Load a profile in your .profile:

[ -r $HOME/.hop/profile ] && source $HOME/.hop/profile

For bash users, load completion file:

[ -r $HOME/.hop/bash-completion ] && source $HOME/.hop/bash-completion

License

MIT

About

Hops to your favorite and frequently used directories.

License:MIT License


Languages

Language:Shell 100.0%