fast-forward lets you remember, find and open your most used commands and folders.
-
Download and extract https://github.com/phparsenal/fast-forward/archive/master.zip
-
Install composer using the Windows installer
-
Make sure dependencies are up to date:
composer install
-
Edit the file
ff.bat
and changeffpath
to the folder you put fast-forward in. -
Copy
ff.bat
to a global path so that it is always available on the command line.
-
Download the project:
cd ~ git clone https://github.com/phparsenal/fast-forward.git
-
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
-
Make sure dependencies are up to date:
composer install
-
Afterwards make the
ff
command available globally by adding this to your~/.bashrc
or~/.bash_aliases
:alias ff='. /path/to/fast-forward/ff.sh'
n/a
Add a new command in one line:
ff add [-d|--description DESCRIPTION] [--] <shortcut> <cmd>
List all available commands and execute the selection:
ff
Searching for htd* If the only result is htd it will be executed, otherwise all matches will be displayed first.
ff run htd
Commands can be abbreviated:
ff r htd
Command | Description |
---|---|
add | Save a command |
delete | Delete a command |
help | Displays help for a command |
list | Lists commands |
run | Search and execute a command |
set | Set or get variables |
update | Update a command |
Show details about a command:
ff help <command>
Usage:
set [options] [--] [<key>] [<value>]
Arguments:
key Name or key of the setting
value Value to be set
Options:
-l, --list Show a list of all current settings.
-d, --default Display a list of supported settings and their defaults.
-f, --import-file=IMPORT-FILE Import from the specified file or STDIN
-i, --import-stdin Import setting via STDIN pipe
e.g.
ff set ff.limit 20
Limit to 20 results
ff set -l > settings.txt
Dump settings
ff set -f settings.txt
Import settings from file
cat settings.txt | ff set -i
Import setting from STDIN
The following settings are supported by fast-forward:
- ff.limit
- Limit amount of results (> 0 or 0 for no limit)
- Default: 0
- ff.sort
- Sort order of results (shortcut, description, command, hit_count, ts_created, ts_modified)
- Default: hit_count
- ff.interactive
- Ask for missing input interactively (0 never, 1 always)
- Default: 1
- ff.color
- Enable color output on supported systems (0/1)
- Default: 1
You can also create your own settings which can be accessed in commands:
ff set location tokio
Use the setting name surrounded by @
in your commands:
weather @location@
The identifiers are replaced with the current or default value of the setting:
weather tokio