aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rw-r--r--cdlog.sh17
2 files changed, 0 insertions, 27 deletions
diff --git a/README.md b/README.md
index 64214e2..248ff71 100644
--- a/README.md
+++ b/README.md
@@ -87,16 +87,6 @@ When one or more persisted session are present, `cdlog`'s initialization
mentions this, suggesting that the `cdr` command may be used to recover
to one of the sessions.
-## `autocs` mode
-
-The variable `cdlog_autocs`, whose default value is `y` (enabled)
-controls `autocs` mode. In `autocs` mode, whenever the
-`cd`/`cdlog.chdir` command successfully changes to a new directory,
-and that directory already occurs in the FIFO, then the previous
-current directory is placed into the FIFO, overwriting that entry.
-Effectively, the original current directory is swapped with the
-FIFO entry as if using the `cs <n>` command.
-
## How is this better?
* It's not hard-coded C code inside the shell; it consists of a small amount of
diff --git a/cdlog.sh b/cdlog.sh
index e1a6181..b712b2e 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -3,9 +3,6 @@
# Globals
declare -A cdlog_alias # cd aliases
-# Configuration variables
-cdlog_autocs=${cdlog_autocs-y} # cd behaves like cs if match
-
# Update after FIFO change.
cdlog.update()
{
@@ -168,19 +165,6 @@ cdlog.chdir()
# only if we successfully change to a different
# directory do the following
- if [ $cdlog_autocs ] ; then
- local d=("" "$c1" "$c2" "$c3" "$c4" "$c5" "$c6" "$c7" "$c8" "$c9")
- unset d[0]
-
- for ((i = 1; i <= 9; i++)); do
- if [ "${d[$i]}" = "$PWD" ] ; then
- d[$i]=$cur
- cdlog.args "${d[@]}"
- return 0
- fi
- done
- fi
-
c9=$c8; c8=$c7; c7=$c6
c6=$c5; c5=$c4; c4=$c3
c3=$c2; c2=$c1
@@ -287,7 +271,6 @@ cdlog.mcd()
local res=1
local i
local d=("" "$c1" "$c2" "$c3" "$c4" "$c5" "$c6" "$c7" "$c8" "$c9")
- local cdlog_autocs= # override to off; mcd doesn't do autocs
if [ $# -gt 0 ] && [ "$1" = -s ] ; then
swap=y