diff options
| author | Teddy Wing | 2016-07-21 18:09:17 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-07-21 18:09:17 -0400 |
| commit | 82502a5ec71c0cd3f5249cea8cc6d3b2eca5a2e4 (patch) | |
| tree | 5c5a8bbc7306b1ff40da3f419b7c664c2ef406bc | |
| parent | 48bd4895c9ed2d76be4cd46b12b00a37cf069f3d (diff) | |
| download | qcd-82502a5ec71c0cd3f5249cea8cc6d3b2eca5a2e4.tar.bz2 | |
qcd: Option parsing skeleton
We only need to support a single flag at a time. Everything else can be
regarded as a directory shortcut.
Allow both `-h` and `--help` to print usage information.
| -rwxr-xr-x | qcd | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -31,8 +31,17 @@ function qcd () { local command=$1 case $command in - shortcut) - cd ${HOME}/path + -a) + ;; + -c) + ;; + -r) + ;; + -h|--help) + print_usage + return + ;; + *) ;; esac } |
