aboutsummaryrefslogtreecommitdiff
path: root/home/john/.shrc
blob: b15dfc229695a2ed49f1f3450a9ea6647bef8381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#	$NetBSD: dot.shrc,v 1.3 2007/11/24 11:14:42 pavel Exp $

if [ -f /etc/shrc ]; then
	. /etc/shrc
fi

case "$-" in *i*)
	# interactive mode settings go here
	export GIT_EDITOR='vi +:"so /usr/local/share/git.exrc"'
	alias ack='ack --noheading'
	alias info='info --vi-keys'
	alias ls='ls -p'
	n() {
		f=`mktemp`
		noice -p "$@" >$f && cd "$(cat $f)"
		rm $f
	}
	go() {
		[ -z "$1" ] && { echo usage: $0 [cmd ...] name 2>&1; return 1; }
		eval name=\$$#
		r=`find . -name "$name" -print -exit`
		[ -z "$r" ] && { echo "$name" not found 2>&1; return 1; }
		[ -f "$r" ] && r="$(dirname "$r")"
		cd "$r" &&
		{ [ $# -eq 1 ] && return; BASH_COMMAND=$* cmdtitle 2>&-; "$@"; }
	}
	;;
esac