config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 3e260b42c4b5f804ab5579e080736a25d7995cc1
parent 11eb17648b891bfe4967036f33a2b02df4cb46ea
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Fri, 12 Mar 2021 15:47:39 -0800

Add cdsub shell function

This function chdir(2)'s into the path resulting from substituting
the first argument (taken as a BRE) with the second.

Diffstat:
Mlocal/shell/.config/shell/cd | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/local/shell/.config/shell/cd b/local/shell/.config/shell/cd @@ -22,3 +22,5 @@ cdr() { } goto() cd "$(dalias $1)/$2" + +cdsub() cd "$(pwd | sed "s!$1!$2!g")"