diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-01-18 13:08:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-01-18 13:08:29 -0800 |
commit | d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed (patch) | |
tree | b51aa7168e0760ce192d31e1afb1c69f542da7ee | |
parent | 82add88ccdaa2f0f556602eb7d11fdaeef3f9129 (diff) | |
download | cdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.tar.gz cdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.tar.bz2 cdlog-d8a3bf2bf8c6783432f2ad3fd1e6c23113d455ed.zip |
README: add section listing advantages.
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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. |