summary refs log tree commit diff
diff options
context:
space:
mode:
-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"
2009-06-11 00:00:35 -0500'>2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro 2009-06-07Return http statuscode 404 on unknown branchLars Hjemli 2009-06-07Add head-include configuration option.Mark Lodato 2009-03-15CGIT 0.8.2.1Lars Hjemli 2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli 2009-03-15fix segfault when displaying empty blobsEric Wong 2009-02-19Add support for HEAD requestsLars Hjemli 2009-02-19Add support for ETag in 'plain' viewLars Hjemli 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli 2009-02-12Makefile: add doc-related targetsLars Hjemli