aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/bd.sh
Commit message (Collapse)AuthorAgeFilesLines
* Use `command` consistently, silence ShellCheckTom Ryder2018-12-171-1/+2
| | | | | | | | | | ShellCheck (SC2164) is upset about these `cd` commands where the return type isn't being checked, but they're all by design, as they're the last command in the function, and thereby constitute the function's return value implicitly. Otherwise, this commit changes the shrc.d and profile.d subfiles to use the `command` wrapper only where it's actually needed.
* Add safety to bd()Tom Ryder2017-05-271-1/+2
| | | | | | Handle case if PWD does not start with a slash--a big "Shouldn't Happen", but easy enough to be worth handling, since it would loop infinitely otherwise
* More refinements to bd()Tom Ryder2017-05-271-28/+11
|
* More bd() improvementsTom Ryder2017-05-261-12/+29
| | | | Including rigorous trailing-slash handling
* Correct default behaviour for bd() with no argsTom Ryder2017-05-261-6/+9
|
* Reimplement sd() without subshellTom Ryder2017-05-261-3/+3
|
* Even terser/nicer bd()Tom Ryder2017-05-251-7/+7
|
* Shorter/saner implementation for bd()Tom Ryder2017-05-251-56/+29
| | | | Avoids subshell mess and consequent trailing-space workaround
* Work around newline-stripping in param expansionTom Ryder2017-01-021-2/+5
|
* Use opening parens for case safety in subshellTom Ryder2016-12-111-6/+6
|
* Remove commented apostrophe from within subshellTom Ryder2016-08-231-1/+1
|
* Fix up ?d() functionsTom Ryder2016-08-231-3/+6
| | | | | | 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`.
* Correctly bail from failed subshellTom Ryder2016-08-201-2/+3
|
* Remove option term spec from bd()Tom Ryder2016-08-201-7/+3
| | | | It doesn't accept options; cd() needs to because it's a wrapper
* Port bd() to POSIX shTom Ryder2016-08-201-0/+67