commit 5b26d81b729ad5835d1f026812b182e289adb077 parent 6948806edb3977a80507d84b6178d446164c2e63 Author: Jacob R. Edwards <n/a> Date: Tue, 16 Nov 2021 15:02:24 -0800 Update rc(1) cd functions - Remove the cdl function and use the raw file instead - Raise an error instead of calling cd without arguments in the cd[rsp] functions Diffstat:
| M | local/rc/lib/profile | | | 7 | +++---- |
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/local/rc/lib/profile b/local/rc/lib/profile @@ -39,10 +39,9 @@ fn cd { status = '' } } -fn cdl { uniq < $dirlog } -fn cdr { cd `{ cdl | egrep $* | tail -1 } } -fn cds { cd `{ pwd | sed s.$1.$2.g } } -fn cdp { cd `{ cdl | fgrep -vx `{ pwd } | tail -1 } } +fn cdr { cd ''^`{ egrep $* < $dirlog | tail -1 } } +fn cds { cd ''^`{ pwd | sed s.$1.$2.g } } +fn cdp { cd ''^`{ fgrep -vx `{ pwd } < $dirlog | tail -1 } } # OpenBSD Package Management if (~ `{ uname } OpenBSD) {