goto & shmark: navigate faster

terminalWe explored go2 in one of our earlier articles on faster terminal navigation. However, alternatives galore in the cmdline world and developers come up with new solutions now and then. We found goto and shmark, two more tools to navigate efficiently using bookmarks.

goto

Saves directories as bookmarks (or shortcuts) and does a fuzzy search to find files and directories. The bookmarks are save under ~/.GOTO directory as plaintext files. For example, the bookmark work will be saved as work.skt. As you might have guessed this works like symbolic links and we think a sorted structure or single file based implementation would have been faster for navigation. Anyway, it’s still handy and the fuzzy search logic is distinct from the navigation logic.

Installation

Run the following commands to install goto:

$ git clone https://github.com/ankitvad/goto.git
$ cd goto
$ make install

Usage

  • goto a bookmark or absolutelocation
    $ goto <bookmark>
    $ goto <location>
  • Save the current directory as bookmark
    $ goto -s
  • List all save bookmarks
    $ goto -l
  • Delete a saved bookmark
    $ goto -d
  • Print the absolute path for a bookmark
    $ goto -p
  • Fuzzy find files/directories matching regex in current directory
    $ goto -f

 

shmark

Another minimal bookmarking tool that uses a single file based approach to record the bookmarks.

Installation

$ git clone https://github.com/charles-l/shmark.git
$ cd shmark
$ chmod +x shmark.sh
$ sudo mv shmark.sh /usr/bin/

Usage

You need to source the shmark.sh file (check below) to run the commands. Assuming that you have saved the file in /usr/bin/ as above the command to source the file is:

$ source /usr/bin/shmark.sh

You may want to add the command in ~/.bashrc to source the file when you run your terminal.

  • To add a bookmark for the current directory
    $ m <bookmark>
  • To cd to a bookmark
    $ g <bookmark>
  • Save all bookmarks to ~/.shmarks
    $ savemarks

    Note that sourcing shmarks.sh is necessary to load all saved bookmarks.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s