Awesome
CMD
Project Status | Communication |
---|---|
Table of Contents
Description
- name:
cmd
- description: Store your favourite commands and scripts in one place.
- author: Filippo Squillace
- username: fsquillace
- OS compatibility: linux, osx
Quickstart
- To add/update a new command/script:
$ cmd add myls
Write the script below and press Cntrl-c on a new line to save it:
ls -l ~
- To add/update a new command/script with variables in it:
$ cmd add myls
Write the script below and press Cntrl-c on a new line to save it:
ls -l $opts $@
- To add a new script in different language add a shebang into it:
$ cmd add myls
Write the script below and press Cntrl-c on a new line to save it:
#!/usr/bin/env python
import os
...
...
- To execute the command/script:
$ cmd execute myls
ls -l ~
Are you sure to run the script? (N/y)> y
...
...
- Alternatively, the command is visible in PATH variable and can be directly executed:
myls
- To execute the command/script substituting variables:
$ cmd execute myls "opts='-a -lt'" /root
ls -l $opts $@
Are you sure to run the script? (N/y)> y
...
...
- To list all the available commands:
$ cmd list
myls
Attach existing commands
If there are already existing commands in a given directory, you can use the
include
command to include such commands into cmd
program:
cmd include "/mydirectory/to/new/commands"
cmd list
cmd
will add all the executable scripts in that directory and in the nested
directories (up to one level only).
Installation
This package needs to be installed via Pearl system.
pearl install cmd
Optionally, you can also install the package cmd-extra
containing a collection of standard commands:
pearl install cmd-extra
Dependencies
The main dependencies are the following:
Troubleshooting
This section has been left blank intentionally. It will be filled up as soon as troubles come in!