diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 14:28:18 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 14:28:18 +1200 |
commit | 1e94aa430c0eefce9396e993272309788c6a21d0 (patch) | |
tree | 7445e71f88a44f2df461a66cd88cd5f5ee14b405 /README.markdown | |
parent | Correct stderr redirection for keychain(1) check (diff) | |
download | dotfiles-1e94aa430c0eefce9396e993272309788c6a21d0.tar.gz dotfiles-1e94aa430c0eefce9396e993272309788c6a21d0.zip |
Fix up ?d() functions
Count arguments in right places; return 2 on usage errors where
possible; minimise subshell activity; move directory replacement
functionality to its own function `rd()` rather than overloading `cd`.
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/README.markdown b/README.markdown index ff73a498..b1948e4b 100644 --- a/README.markdown +++ b/README.markdown @@ -167,8 +167,6 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include: * `bc()` silences startup messages from GNU `bc(1)`. * `bd()` changes into a named ancestor of the current directory. * `diff()` forces the unified format for `diff(1)`. -* `cd()` wraps the `cd` builtin to allow for a second parameter for string - substitution, emulating a Zsh function I like. * `ed()` tries to get verbose error messages, a prompt, and a Readline environment for `ed(1)`. * `env()` sorts the output of `env(1)` if it was invoked with no arguments, @@ -192,6 +190,9 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include: * `pd()` changes to the argument's parent directory. * `pwgen()` generates just one decent password with `pwgen(1)`. * `rcsdiff()` forces a unified format for `rcsdiff(1)`. +* `rd()` replaces the first instance of its first argument with its second + argument in `$PWD`, emulating a feature of the Zsh `cd` builtin that I + like. * `scp()` tries to detect forgotten hostnames in `scp(1)` command calls. * `scr()` creates a temporary directory and changes into it. * `sd()` changes into a sibling of the current directory. |