summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home/.shrc10
1 files changed, 10 insertions, 0 deletions
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"
llow=1'>Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe