aboutsummaryrefslogtreecommitdiff
path: root/home/john/.shrc
blob: 74a6744db9c91e3e02f3b2f25cc88876c22deddc (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#	$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*)
	[ -z "$_PATH" ] && export _PATH=$PATH
	[ -z "$_MANPATH" ] && export _MANPATH=$MANPATH
	export PATH=/usr/pkg/heirloom-doctools/bin:$_PATH
	export MANPATH=/usr/pkg/heirloom-doctools/man:$_MANPATH

	export GIT_EDITOR='vi +:"so /usr/local/share/git.exrc"'

	alias ack='ack --noheading --nocolor'
	alias info='info --vi-keys'
	alias ls='ls -p'
	alias mail='PAGER=more mail'

	n() {
		f=`mktemp`
		noice -p "$@" >$f && cd "$(cat $f)"
		rm $f
	}

	m() {
		if [ -t 1 ]; then
			"$@" 2>&1 | less -XF
		else
			less -XF
		fi
	}

	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" && [ $# -gt 1 ] && "$@"
	}

	sys() {
		PATH=$_PATH MANPATH=$_MANPATH "$@"
	}
esac