diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-12-17 12:03:56 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-12-17 12:04:19 -0800 |
commit | ac7f3c3f8f53773b42d33b901f73c615c60479ad (patch) | |
tree | 8e21e52ab45209ab67bbbf916f64ca44328beac9 | |
parent | 9b6e4e35fb1a123b28d17b0086116b6b62c1ea56 (diff) | |
download | cdlog-ac7f3c3f8f53773b42d33b901f73c615c60479ad.tar.gz cdlog-ac7f3c3f8f53773b42d33b901f73c615c60479ad.tar.bz2 cdlog-ac7f3c3f8f53773b42d33b901f73c615c60479ad.zip |
bug: cd history not working when not in cdlog_lru mode.
* cdlog.sh (cdlog.chdir): The loop which shifts entries
into the log must terminate at 1 not 2. The loop body
must expand the d[] variable properly.
-rw-r--r-- | cdlog.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -241,8 +241,8 @@ cdlog.chdir() pv=$nx done else - for ((i = ${#d[@]}; i >= 2; i--)); do - d[$((i+1))]=d[$i] + for ((i = ${#d[@]}; i >= 1; i--)); do + d[$((i+1))]=${d[$i]} done d[1]=$cur |