configs  Check-in [4563b09c34]

Overview
Comment:zshrc: Auto-detect whether to use gls / ggrep
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4563b09c34a07d0476a5be4f88b4f535aa9b56c8a0355c5f7bd2023039c238d8
User & Date: js 2018-07-08 20:14:37
Context
2018-10-20
15:11
zshrc: Major cleanup check-in: 57e4d354a0 user: js tags: trunk
2018-07-08
20:14
zshrc: Auto-detect whether to use gls / ggrep check-in: 4563b09c34 user: js tags: trunk
20:04
zshrc: Remove sprunge and add vi alias check-in: c6e90e5459 user: js tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to zshrc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
AUDIO_PLAYER="audacious"
VIDEO_PLAYER="mpv"
ARCHIVE_FORMATS=(7z bz2 gz xz tar tbz tbz2 tgz txz tar.gz tar.bz2 tar.xz rar zip)
AUDIO_PLAYER_FORMATS=(aac flac it m4a mod mp3 mpc ogg sid spc wma wv xm)
VIDEO_PLAYER_FORMATS=(avi divx flv mkv mov mpeg mp4 mpg ogm wmv)
EDITOR="vim"
PAGER="less"
GREP="ggrep"
GREP_COLOUR="auto"
FGREP=""
LS="gls"
LS_COLOUR="auto"
LS_ON_CD="yes"
LS_ON_INIT="no"
LS_COLORS='di=34:ow=44;37:tw=44;37:st=44;37:ex=31:su=7;31:sg=7;31:ln=33:or=7;33:pi=32:do=32:bd=35:cd=35:so=32:*.bz2=36:*.dmg=36:*.gz=36:*.gpg=36:*.rar=36:*.tar=36:*.tbz2=36:*.tgz=36:*.xz=36:*.zip=36:*.orig=90:*~=90'
FEMALE="no"	# Whether the user is female ;)
LISTMAX=32768
WORDCHARS="*?[];!#~"







|


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
AUDIO_PLAYER="audacious"
VIDEO_PLAYER="mpv"
ARCHIVE_FORMATS=(7z bz2 gz xz tar tbz tbz2 tgz txz tar.gz tar.bz2 tar.xz rar zip)
AUDIO_PLAYER_FORMATS=(aac flac it m4a mod mp3 mpc ogg sid spc wma wv xm)
VIDEO_PLAYER_FORMATS=(avi divx flv mkv mov mpeg mp4 mpg ogm wmv)
EDITOR="vim"
PAGER="less"
GREP=""
GREP_COLOUR="auto"
FGREP=""
LS=""
LS_COLOUR="auto"
LS_ON_CD="yes"
LS_ON_INIT="no"
LS_COLORS='di=34:ow=44;37:tw=44;37:st=44;37:ex=31:su=7;31:sg=7;31:ln=33:or=7;33:pi=32:do=32:bd=35:cd=35:so=32:*.bz2=36:*.dmg=36:*.gz=36:*.gpg=36:*.rar=36:*.tar=36:*.tbz2=36:*.tgz=36:*.xz=36:*.zip=36:*.orig=90:*~=90'
FEMALE="no"	# Whether the user is female ;)
LISTMAX=32768
WORDCHARS="*?[];!#~"
39
40
41
42
43
44
45




46


47
48
49
50
51
52




53


54
55
56
57
58
59
60






61
62
63
64
65
66
67
autoload -U compinit
compinit -C

# Ignore case on completion
zstyle ':completion:*' matcher-list 'm:{A-Z}={a-z} m:{a-z}={A-Z}'

if [ "$GREP" -o "$GREP_COLOUR" ]; then




	[ -z "$GREP" ] && GREP="grep"


	[ ! -z "$GREP_COLOUR" -a "$GREP_COLOUR[1]" != "-" ] && \
		GREP_COLOUR="--colour=$GREP_COLOUR"
	alias grep="$GREP $GREP_COLOUR"
fi

if [ "$FGREP" -o "$GREP_COLOUR" ]; then




	[ -z "$FGREP" ] && FGREP="fgrep"


	[ ! -z "$GREP_COLOUR" -a "$GREP_COLOUR[1]" != "-" ] && \
		GREP_COLOUR="--colour=$GREP_COLOUR"
	alias fgrep="$FGREP $GREP_COLOUR"
fi

if [ "$LS" -o "$LS_COLOUR" ]; then
	[ -z "$LS" ] && LS="ls"






	[ ! -z "$LS_COLOUR" -a "$LS_COLOUR[1]" != "-" ] && \
		LS_COLOUR="--color=$LS_COLOUR"
	alias ls="$LS $LS_COLOUR"
fi

if [ "$LS_ON_CD" -a "$LS_ON_CD" != "no" ]; then
	chpwd() {







>
>
>
>
|
>
>






>
>
>
>
|
>
>






|
>
>
>
>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
autoload -U compinit
compinit -C

# Ignore case on completion
zstyle ':completion:*' matcher-list 'm:{A-Z}={a-z} m:{a-z}={A-Z}'

if [ "$GREP" -o "$GREP_COLOUR" ]; then
	if [ -z "$GREP" ]; then
		if which ggrep &>/dev/null; then
			GREP="ggrep"
		else
			GREP="grep"
		fi
	fi
	[ ! -z "$GREP_COLOUR" -a "$GREP_COLOUR[1]" != "-" ] && \
		GREP_COLOUR="--colour=$GREP_COLOUR"
	alias grep="$GREP $GREP_COLOUR"
fi

if [ "$FGREP" -o "$GREP_COLOUR" ]; then
	if [ -z "$FGREP" ]; then
		if which ggrep &>/dev/null; then
			FGREP="ggrep -F"
		else
			FGREP="fgrep"
		fi
	fi
	[ ! -z "$GREP_COLOUR" -a "$GREP_COLOUR[1]" != "-" ] && \
		GREP_COLOUR="--colour=$GREP_COLOUR"
	alias fgrep="$FGREP $GREP_COLOUR"
fi

if [ "$LS" -o "$LS_COLOUR" ]; then
	if [ -z "$LS" ]; then
		if which gls &>/dev/null; then
			LS="gls"
		else
			LS="ls"
		fi
	fi
	[ ! -z "$LS_COLOUR" -a "$LS_COLOUR[1]" != "-" ] && \
		LS_COLOUR="--color=$LS_COLOUR"
	alias ls="$LS $LS_COLOUR"
fi

if [ "$LS_ON_CD" -a "$LS_ON_CD" != "no" ]; then
	chpwd() {