diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-01-19 18:07:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-01-19 18:07:43 -0800 |
commit | ea2a3600f1b8b432c2a1f3adaf873982e9fa489b (patch) | |
tree | 93b2a23dfe1f943e49e73ba241a30d28ac344d9d | |
parent | 1f130366be64a5a86ac94126384413cc8d07d0df (diff) | |
download | cdlog-ea2a3600f1b8b432c2a1f3adaf873982e9fa489b.tar.gz cdlog-ea2a3600f1b8b432c2a1f3adaf873982e9fa489b.tar.bz2 cdlog-ea2a3600f1b8b432c2a1f3adaf873982e9fa489b.zip |
Improve initialization.
* cdlog.sh (toplevel): Ensure that c1 exists, so that the
init code doesn't access a nonexistent c1. Condense
the assignments in the init block.
-rw-r--r-- | cdlog.sh | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,15 +1,13 @@ # License at bottom. # Initialize cdlog the first time. + +c1=${c1-} + if [ -z "$c1" ] ; then - c9= - c8= - c7= - c6= - c5= - c4= - c3= - c2= + c9=; c8=; c7= + c6=; c5=; c4= + c3=; c2= fi # One-letter nicknames for most recent four dirs. |