From 82502a5ec71c0cd3f5249cea8cc6d3b2eca5a2e4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 21 Jul 2016 18:09:17 -0400 Subject: 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. --- qcd | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qcd b/qcd index 4cacfba..066aa70 100755 --- a/qcd +++ b/qcd @@ -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 } -- cgit v1.2.3