diff options
| author | Teddy Wing | 2016-07-21 18:05:02 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-07-21 18:05:02 -0400 |
| commit | 48bd4895c9ed2d76be4cd46b12b00a37cf069f3d (patch) | |
| tree | b3e4d98a53dcbc807e29e13744fbacf91e64aa33 | |
| parent | 6a49faba8d13bcec7a6020f2413dac99008c89e4 (diff) | |
| download | qcd-48bd4895c9ed2d76be4cd46b12b00a37cf069f3d.tar.bz2 | |
qcd: Update usage output
Going for documentation-driven programming. The new usage draft shows
how the new version of the command should be called, what options it
takes, and in essence what it should be able to do.
| -rwxr-xr-x | qcd | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -6,9 +6,25 @@ QCD_CONFIG_DIR=${QCD_CONFIG_DIR:-"${XDG_CONFIG_HOME}/qcd"} QCD_DATABASE_FILE=${QCD_DATABASE_FILE:-"${QCD_CONFIG_DIR}/database"} +function print_usage () { + cat 1>&2 <<__EOF__ +Usage: + qcd SHORTCUT + qcd -acrh SHORTCUT [PATH] + + The first call changes to the directory specified by SHORTCUT. + The second allows manipulation of the shortcut database. + + -a Add a new shortcut pointing to PATH + -c Change an existing shortcut to PATH + -r Remove SHORTCUT + -h Display this help +__EOF__ +} + function qcd () { if [[ $# < 1 ]]; then - echo 'Usage: qcd SHORTCUT' 1>&2 + print_usage return fi |
