Crumbs is a command-line utility for the shell, for storing commands under a meaningful name in a hierarchy
For web service tests I am used to sending a lot of HTTP Requests via curl
. The command line invocation can be quite complex and long and I wanted to be able to organize them in a directory like structure. Also I wanted to have a context sensitive auto completion for the different command invocations.
Aliases do not allow a user to use foward slashes in the alias name in order to create complex hierarchies and therefore no context sensitive auto completion.
For installing crumbs on Arch Linux an AUR package is provided at: https://aur.archlinux.org/packages/crumbs/
On macOS you can install crumbs with Homebrew like this:
$ brew install mhubig/crumbs/crumbs
In order to compile and install crumbs on your local system you the following software must be available on the system:
- Checkout the sources from github.
git clone https://github.com/fasseg/crumbs.git
- Run automake to create required files and the configure script. Optionally specify the installation path with
--prefix
and the path for the config file with--sysconfdir
.
cd crumbs
automake --add-missing
./configure --prefix='/usr/local' --sysconfdir='/etc'
- Compile the program.
make
- Install the binaries and the man pages.
sudo make install
The default configuration file is /etc/crumbs.conf
. It contains the following settings:
path
The path to use for storing data. If the path starts with a forward slash crumbs uses an absolute path to the configuration file. If the path is not starting with a forward slash the current user's home directory is prepended to the path.
A different configuration file can be used by invoking crumbs with the --config
option
An auto completion file for the bash shell is included and installed in /usr/local/share/crumbs/crumbs-completion.bash
. In order to enable the completion you can copy the file crumbs-completion.bash
to e.g. /usr/local/share/crumbs/
and source in your .bashrc
file:
echo "source /usr/local/share/crumbs/crumbs-completion.bash" >> ~/.bashrc
You can check the help dialog of the program or the man page for usage documentation and some examples:
crumbs --help
man crumbs