From 1e94aa430c0eefce9396e993272309788c6a21d0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 14:28:18 +1200 Subject: 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`. --- README.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.markdown') 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. -- cgit v1.2.3