Skip to content
Brian Schiller edited this page Jul 12, 2014 · 19 revisions

to - A simple shell script for bookmarking file system locations with advanced tab completion

Shells

bash

Installation

In ~/.bashrc (or ~/.bash_profile for certain distributions)

source /absolute/path/to.sh

Tab Completion

Press <TAB> to autocomplete arguments. If there are multiple possible arguments, no completion will be made, but pressing <TAB> a second time will display possible completions.

Tip: You can speed up completion suggestions by adding to your ~/.inputrc file:

set show-all-if-unmodified on

to immediately show possible arguments when no completion is made (saving one <TAB>)

zsh

Installation

In ~/.zshrc

source /absolute/path/to.sh

Tab completion

<TAB> cycles through possible completions on zsh. Use <RIGHT ARROW> or <SHIFT+TAB> to select a completion and continue expanding subdirectories with <TAB>.

Operating sytems

GNU/Linux

to is developed and tested on the Linux kernel with GNU software. The latest stable commit on the master branch should always support this environment.

The following GNU tools are used:

  • ln
  • readlink
  • rm
  • mkdir
  • echo
  • find
  • dirname
  • basename
  • sed

OSX

Mac OSX is based off the POSIX specification with BSD software. The latest stable commit on the master branch usually has been tested and should support this environment. You will need to have tree installed (available on homebrew with brew install tree).

BSD

Not tested. However, things should be similar enough to OSX that if the script does not function with native tools, identical behaviour could be expected if one simply installed the GNU version of the tools listed above.