diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-08 20:17:18 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-08 20:17:18 -0800 |
commit | dbfbebee76ad3e58ef472b2da8acd98b461857a4 (patch) | |
tree | f5ab91be3d0b2a48a413c0f270d54a7010a19731 | |
parent | 82bdc9e8ce75c44979701ef052f038e2a9a4448e (diff) | |
download | cdlog-dbfbebee76ad3e58ef472b2da8acd98b461857a4.tar.gz cdlog-dbfbebee76ad3e58ef472b2da8acd98b461857a4.tar.bz2 cdlog-dbfbebee76ad3e58ef472b2da8acd98b461857a4.zip |
bugfix: don't let user select invalid context number.
* cdlog.sh (cdlog.get_param): Only produce output if
shift succeeds. If shift fails, it means that many
shifts are not possible and the parameters are unaffected.
-rw-r--r-- | cdlog.sh | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -37,8 +37,9 @@ cdlog.args() # Utility for nth positional param cdlog.get_param() { - shift $1 + if shift $1 ; then echo "$1" + fi } # Read state from ~/.cdlog.dirs |