aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-01-18 13:08:29 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-01-18 13:08:29 -0800
commitd8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed (patch)
treeb51aa7168e0760ce192d31e1afb1c69f542da7ee
parent82add88ccdaa2f0f556602eb7d11fdaeef3f9129 (diff)
downloadcdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.tar.gz
cdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.tar.bz2
cdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.zip
README: add section listing advantages.
-rw-r--r--README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md
index f447c92..b6004b3 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,33 @@ is `/etc` and `c1` holds `/var`, then `cdlog.chdir /var`
will change to `/var` and just replace `c1` with `/etc`, without rotating
through the FIFO entries `c2` through `c9`.
+## How is this better?
+
+* It's not hard-coded C code inside the shell; it consists of a small amount of
+code whose behavior that can be customized by the end-user.
+
+* Uses simple variables, which are better supported for completion
+and require fewer keystrokes.
+
+* The `dirs` command for accessing the directory stack in Bash is too
+clumsy and won't be discussed here any more.
+
+* Bash's shorthand notation for accessing the nth element, namely `~-n`, takes
+more keystrokes than `cdlog`'s aliases for the first four elements, `$x`
+through `$w`.
+
+* Bash's shorthand notation requires an explicit slash to be typed
+in order for completion to work. `~-n` followed by tab is not sufficient.
+You must type a slash and then Tab. Whereas completing on the variable `$x`
+just requires Tab. One tab will automatically add the slash and then additional
+tabs engage further completion.
+
+* Bash's `direxpand` option does not work for `~-n` notation. Completion
+works, but the notation remains unexpanded.
+
+* Most of `cdlog` is portable to other shells. All that is nonportable
+in the code is the use of `local`, and the `shopt -o direxpand` command.
+
## License
This is under distributed under a modified two-clause BSD license.