speed-dial is a CLI bookmarking & shortcuts utility, allowing you to alias and index directory paths within 'entry groups', manage directory 'listings' (speed-dial will list out the children of a 'listing' and ask which you'd like to make your new current working directory), and swap your current working directory quickly by targeting entries or listings.

speed-dial's init command sources a bash script from the package making a few commands to interact with speed-dial available.

sd: The main speed-dial interface

s: Shortcut to sd go [alias|id]

These sd and s commands should be your sole method for interacting with speed-dial. Technically you can interact with speed-dial without issue using the provided speed-dial binary directly, however when calling speed-dial go [...] no redirection will occur on exit of the script.

speed-dial should not be run directly using the node package's bin/speed-dial binary.

There is an inherent issue trying to change the terminal's current working directory from within a child process. Changing the current working directory from within speed-dial only changes the directory of the child process speed-dial is running within and only for the duration of the script's execution. Once speed-dial finishes execution, returning focus back to the main terminal's process, the current working directory will remain as it was prior to executing the speed-dial command.

speed-dial works around this limitation by writing the target directory to a file in /tmp just before it's process exits. When calling speed-dial through the available shell functions, the target directory is read from the /tmp file and the appropriate cd [target directory] command is executed directly within the terminal's process.

If anyone would like to suggest a better (and multi-user-friendly)
alternative, please create an issue or send a pull request.

Prints the name of the currently active group if [name] is not provided. If [name]is provided, speed-dial's currently active group will be changed.

sd group # prints 'default'

sd group work # changes currently active group to 'work'

sd group # prints 'work'

When running a command like sd go [alias|id](or s [alias|id] for short), speed-dial will restrict it's lookup to the currently active group. By switching the active group as you shift focus throughout the day, you can avoid the need to pass the group name to s when performing a lookup.

Lists all entries by group and all listings, with an incrementing ID value that is not reset for each group or the listings. Prompts for the ID value corresponding to the entry or listing to be removed. After confirmation, the entry or listing will be removed from the speed-dial storage.

For a user-created entry group, if no entries remain in the group after the one specified was removed, the user-created entry group will be removed from the speed-dial storage too.

The lookup would fail. This can be annoying since the proj alias does exist, just not in the active group.

To alleviate this frustration while still allowing for the clean organization of aliases within groups, you can set the globalLookupFallback config option to true.

➜ ~ ✗ sd config set globalLookupFallback true

Now the lookup will treat all aliases as though they were in a single group.

➜ ~ ✗ s proj

info: The /Users/deefour/Work/proj path from the work group with scms has been selected

info: The current working directory is now /Users/deefour/Work/proj

Note: The first alias matched will be used. This means in the above example if the alias two was searched, it will only ever match the entry in the default group unless the work group is active or specified on the command line through s work two(in which case the globalLookupFallback is ignored anyway).