Overview
Comment: | Update zshrc. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bed01d4eaea9534cf938daa6d170f2c3 |
User & Date: | js 2012-10-22 08:17:16 |
Context
2012-12-17
| ||
20:22 | Add LS_COLORS. check-in: fd67ad2ef5 user: js tags: trunk | |
2012-10-22
| ||
08:17 | Update zshrc. check-in: bed01d4eae user: js tags: trunk | |
08:15 | Add Xmodmap. check-in: c2680de5e3 user: js tags: trunk | |
Changes
Changes to zshrc.
1 2 | AUDIO_PLAYER="open" VIDEO_PLAYER="open" | | | < | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | AUDIO_PLAYER="open" VIDEO_PLAYER="open" 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" LS_COLOUR="auto" LS_ON_CD="yes" LS_ON_INIT="no" FEMALE="no" # Whether the user is female ;) LISTMAX=32768 WORDCHARS="*?[];!#~" |
︙ | ︙ | |||
33 34 35 36 37 38 39 | 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 | | | | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 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" |
︙ | ︙ | |||
121 122 123 124 125 126 127 | *) precmd() { _precmd } ;; esac | < < | > > > < < < < < < | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | *) precmd() { _precmd } ;; esac extr() { for i in $@; do case $i in *.7z) 7za x $i ;; *.tar) tar xfv $i ;; *.tbz | *.tbz2 | *.tar.bz2) bzcat $i | tar xfv - ;; *.tgz | *.tar.gz) zcat $i | tar xfv - ;; *.txz | *.tar.xz) xzcat $i | tar xfv - ;; *.rar) unrar x $i ;; *.zip) unzip $i ;; # These have to be the last for obvious reasons *.bz2) bunzip2 $i ;; *.gz) gunzip $i ;; *.xz) unxz $i ;; *) echo "$i: Unknown file type" false ;; esac done } run_desktop() { for i in $@; do $(grep -i "^exec=" $i | sed "s/^exec=//i") done } sprunge() { curl -F "sprunge=<-" http://sprunge.us } for ext in $ARCHIVE_FORMATS; do alias -s $ext=extr; done [ "$AUDIO_PLAYER" ] && \ for ext in $AUDIO_PLAYER_FORMATS; do alias -s $ext=$AUDIO_PLAYER; done [ "$VIDEO_PLAYER" ] && \ for ext in $VIDEO_PLAYER_FORMATS; do alias -s $ext=$VIDEO_PLAYER; done alias -s desktop=run_desktop alias -s app=open [ "$LS_ON_INIT" = "yes" ] && ls unset AUDIO_PLAYER VIDEO_PLAYER unset ARCHIVE_FORMATS AUDIO_PLAYER_FORMATS VIDEO_PLAYER_FORMATS unset FGREP GREP GREP_COLOUR LS LS_COLOUR LS_ON_CD LS_ON_INIT |