From d398e5b54b0771a67bdfbba3cbe641068dfba97c Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 5 Dec 2019 10:10:13 -0500 Subject: Allow cd-ing into a file --- home/.shrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/.shrc b/home/.shrc index 45b2fe62..b864018b 100644 --- a/home/.shrc +++ b/home/.shrc @@ -18,6 +18,16 @@ alias rand='openssl rand -base64 33' alias private='eval "$(gpg -d ~/.private)"' bman() { ssh ${freebsd:-monday} man "$@" | sh -c "$MANPAGER"; } +cd() { + if [ $# -eq 0 ]; then + builtin cd + elif [ -e "$1" -a ! -d "$1" ]; then + builtin cd "${1%/*}" && $EDITOR "${1##*/}" + else + builtin cd "$@" + fi +} + PS0=$'\n' PS1='\$ ' RPS1="\? ${SSH_CLIENT:+\h:}\w" -- cgit 1.4.1 > dontfiles
summary refs log tree commit diff
path: root/home/.kshrc (unfollow)
Commit message (Collapse)Author
2020-02-12Move catgirl up the pageJune McEnroe
2020-02-12Update catgirl pty grabJune McEnroe
2020-02-12Link to cgit /about pages where appropriateJune McEnroe
2020-02-11Separate LINKS from BINS for html to workJune McEnroe
2020-02-11Add margin to Bl-bullet itemsJune McEnroe
2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe
2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe
Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable.
2020-02-09Add To Be Taught, If FortunateJune McEnroe
2020-02-04Add The Future of Another TimelineJune McEnroe
Wow. One of the best I've read.
2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe
Broke out LDLIBS for each bin, and made everything more uniform.
2020-01-28Change scout sensitivity to 1.4June McEnroe
idk it seems to work.
2020-01-28Import shows.txtJune McEnroe