From 7da3d2f3805e49dc57e5c41e0fc9581e6f001bb2 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 18 May 2008 17:11:03 +0100 Subject: [PATCH 01/16] fold fignore into ignored-patterns --- .zsh/zshrc/20_compsys | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.zsh/zshrc/20_compsys b/.zsh/zshrc/20_compsys index 57811dc..8c389c7 100644 --- a/.zsh/zshrc/20_compsys +++ b/.zsh/zshrc/20_compsys @@ -46,9 +46,9 @@ zstyle ':completion:*:*:*:*' menu select # use colours in completion lists and menus zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -# ignore working and backup copies +# ignore working and backup copies, and compiled objects zstyle ':completion:*:(all-|)files' ignored-patterns \ - '*.bk' '*.bak' '*.old' '*~' '.*.sw?' + '*.bk' '*.bak' '*.old' '*~' '.*.sw?' '*.o' '*.pyc' zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3)) numeric )' @@ -94,6 +94,4 @@ zstyle ':completion:*:messages' format '%d' zstyle ':completion:*:warnings' format 'no matches for: %d' zstyle ':completion:*' group-name '' -fignore=(~ .o .pyc) - # vim:ft=zsh -- 2.39.5 From 9aecf79bcc69f84f55d347ca88446df351626e0c Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 20 May 2008 18:59:10 +0100 Subject: [PATCH 02/16] always set proper user agent --- .zsh/zshrc/30_aliases | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 562f4b9..0e767cf 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -18,11 +18,13 @@ alias find='noglob find' alias w3m='noglob w3m -no-mouse' alias links='noglob links' alias wb='noglob www-browser' -alias wget='noglob wget' alias curl='noglob curl' alias apt-cache='noglob apt-cache' alias locate='noglob locate' +local _USER_AGENT="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2)" +alias wget="noglob wget --user-agent='$USER_AGENT'" + typeset -a _ls_opts; _ls_opts=(-bC --color=auto) command ls --group-directories-first >/dev/null 2>&1 \ && _ls_opts+=--group-directories-first -- 2.39.5 From 80612165af8557e0d1b82b5760a5c9c471d564dc Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 20 May 2008 19:03:45 +0100 Subject: [PATCH 03/16] add stealth wget --- .zsh/zshrc/30_aliases | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 0e767cf..e5e6e8a 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -18,12 +18,13 @@ alias find='noglob find' alias w3m='noglob w3m -no-mouse' alias links='noglob links' alias wb='noglob www-browser' +alias wget='noglob wget' alias curl='noglob curl' alias apt-cache='noglob apt-cache' alias locate='noglob locate' local _USER_AGENT="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-2)" -alias wget="noglob wget --user-agent='$USER_AGENT'" +alias swget="noglob wget --user-agent='$USER_AGENT'" typeset -a _ls_opts; _ls_opts=(-bC --color=auto) command ls --group-directories-first >/dev/null 2>&1 \ -- 2.39.5 From 613dfe05e23387248b2b163ebc2e064d26ceb80f Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 22 May 2008 10:29:08 +0200 Subject: [PATCH 04/16] remove more log files --- .zsh/zshrc/90_cleanfiles | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 555461c..7bab8d4 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -24,6 +24,8 @@ rmfiles+=~/.bash_history rmfiles+=~/core rmfiles+=~/nohup.out rmfiles+=~/typescript +rmfiles+=~/jpilot.log +rmfiles+=~/srtp.log typeset -la _rmfiles -- 2.39.5 From bcb29e299d0786ccbee8a255eb9e178a87511b55 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 22 May 2008 15:05:26 +0200 Subject: [PATCH 05/16] fix log output for cleanfiles --- .zsh/zshrc/90_cleanfiles | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 7bab8d4..513c01b 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -29,15 +29,15 @@ rmfiles+=~/srtp.log typeset -la _rmfiles -for f in ${~rmfiles[@]}; do +for f in ${~rmfiles}; do [[ -f $f ]] || continue _rmfiles+="$f" done -unset rmfiles -if [[ -n $_rmfiles ]]; then - info "Removing files: ${(j: :)${_rmfiles#$HOME/}}..." +if (( $#_rmfiles )); then + _rmfiles=(${_rmfiles#$HOME/}) + info "Removing files: ${_rmfiles[@]}..." rm -f ${_rmfiles[@]} fi -- 2.39.5 From fb8769fc4556cf2fdef03bbcacd913c77a7dcb6a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 22 May 2008 20:07:36 +0200 Subject: [PATCH 06/16] use per-host history files --- .zsh/zshrc/80_history | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zsh/zshrc/80_history b/.zsh/zshrc/80_history index af0f93b..d32d4ea 100644 --- a/.zsh/zshrc/80_history +++ b/.zsh/zshrc/80_history @@ -9,7 +9,8 @@ # # typeset -g on this one to make warn_create_global happy -typeset -g HISTFILE=$ZVARDIR/history +typeset -g HISTFILE=$ZVARDIR/history-$HOST +[[ -e $ZVARDIR/history ]] && mv $ZVARDIR/history $HISTFILE HISTSIZE=10000 SAVEHIST=$HISTSIZE LISTMAX=1000 -- 2.39.5 From 9cda4c27ae54bb41714d00c196664981ea16003a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 31 May 2008 08:30:36 +0200 Subject: [PATCH 07/16] add aliases to use less instead of tail on logs --- .zsh/zshrc/30_aliases | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index e5e6e8a..c13062a 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -77,10 +77,15 @@ else alias t='tail -f' fi alias tsl='t /var/log/syslog' +alias lsl='sensible-pager /var/log/syslog' alias tml='t /var/log/mail.log' +alias lml='sensible-pager /var/log/mail.log' alias tal='t /var/log/auth.log' +alias lal='sensible-pager /var/log/auth.log' alias tdl='t /var/log/daemon.log' +alias ldl='sensible-pager /var/log/daemon.log' alias tkl='t /var/log/kern.log' +alias lkl='sensible-pager /var/log/kern.log' alias px='ps afux' alias mps='ps -ao user,pcpu,start,command' -- 2.39.5 From 31dd1414e8c5506b61f5c5445ddf5af40f3d21a3 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 2 Jun 2008 08:00:01 +0200 Subject: [PATCH 08/16] ls -rt on chdir() --- .zsh/zshrc/30_aliases | 4 +++- .zsh/zshrc/31_cd_bugfix2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index e5e6e8a..0462be3 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -36,6 +36,8 @@ alias ll='ls -l' alias l=ll alias la='ls -a' alias lla='ls -la' +alias lrt='ls -lrt' +alias lart='ls -lart' # List only directories and symbolic links that point to directories alias lsd='ls -ld *(-/DN)' @@ -44,7 +46,7 @@ alias lssmall="ls -Srl *(.oL[1,10])" alias lsnew="ls -rl *(D.om[1,10])" alias lsold="ls -rtlh *(D.om[1,10])" -cd () { builtin cd $* && ll } +cd () { builtin cd "$@" && lrt } #_cd_l() { ll } #chpwd_functions+=_cd_l diff --git a/.zsh/zshrc/31_cd_bugfix2 b/.zsh/zshrc/31_cd_bugfix2 index f551907..b1aae20 100644 --- a/.zsh/zshrc/31_cd_bugfix2 +++ b/.zsh/zshrc/31_cd_bugfix2 @@ -1,3 +1,3 @@ # fix until #480889 is fixed -cd () { builtin cd $* && ll } +cd () { builtin cd "$@" && lrt } -- 2.39.5 From f12d8d77bc102889ac86eb8670b4d69c03081fc7 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 4 Jun 2008 08:50:09 +0200 Subject: [PATCH 09/16] add aliases for iproute mistypes --- .zsh/zshrc/30_aliases | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 6dcdfbf..a47396b 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -130,4 +130,8 @@ alias dpkg-buildpackage="dpkg-buildpackage -k$DEBKEYID" uc() { unicode --max=0 --colour=off "$@" | sensible-pager } +alias ipr='ip r' +alias ipa='ip a' +alias ipl='ip l' + # vim:ft=zsh -- 2.39.5 From 043fdcd71e0577902a44cc6b7acc191abcf25c26 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 4 Jun 2008 20:47:36 +0200 Subject: [PATCH 10/16] add btd alias for bittorrent --- .zsh/zshrc/30_aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index a47396b..2817fdc 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -134,4 +134,6 @@ alias ipr='ip r' alias ipa='ip a' alias ipl='ip l' +alias btd='btdownloadheadless' + # vim:ft=zsh -- 2.39.5 From 5816d75a8656f24dbe1113054522206f321139d9 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 4 Jun 2008 20:49:32 +0200 Subject: [PATCH 11/16] unset RPS1 before entering typescript --- .zsh/func/TS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh/func/TS b/.zsh/func/TS index 63eb5fb..609b6cb 100755 --- a/.zsh/func/TS +++ b/.zsh/func/TS @@ -14,7 +14,7 @@ local topic filename ret topic="${(j:_:)@}" filename="${TMPDIR:-/tmp}/script.${topic:-$LOGNAME}.$$.$(date +%Y%m%d.%H%M)" echo "I: writing typescript to $filename ..." >&2 -PS1="%# " PS2= script -c "zsh -f" -f -q "$filename" +PS1="%# " PS2= RPS1= script -c "zsh -f" -f -q "$filename" ret=$? echo "I: typescript is in $filename ." return $ret -- 2.39.5 From ff19048b3c4b72e3ee54cf346ad9827764e5baff Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 15 Jun 2008 22:07:58 +0200 Subject: [PATCH 12/16] remove hs_err_* files --- .zsh/zshrc/90_cleanfiles | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 513c01b..0aa9df9 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -26,6 +26,7 @@ rmfiles+=~/nohup.out rmfiles+=~/typescript rmfiles+=~/jpilot.log rmfiles+=~/srtp.log +rmfiles+=~/hs_err_pid[0-9]*.log typeset -la _rmfiles -- 2.39.5 From 19fd952a611c7e3eaecd146e91e0dbf6400fe6be Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 16 Jun 2008 15:23:54 +0200 Subject: [PATCH 13/16] add ipv6 flag to xterm title --- .zsh/zshrc/80_xtermtitle | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/zshrc/80_xtermtitle b/.zsh/zshrc/80_xtermtitle index 6496952..e969c6d 100644 --- a/.zsh/zshrc/80_xtermtitle +++ b/.zsh/zshrc/80_xtermtitle @@ -27,6 +27,7 @@ __get_session_flags() { local flags; flags= [ -n "$DISPLAY" ] && flags="${flags}x" [ -n "$SSH_AUTH_SOCK" ] && flags="${flags}a" + [[ $SSH_CLIENT = *:* ]] && flags="${flags}6" [ -n "$flags" ] && echo "[${flags}]" } -- 2.39.5 From 99ce3c28e3d8483dbbbc5f798bb9c4e262af59a7 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 17 Jun 2008 10:19:15 +0200 Subject: [PATCH 14/16] restore old GIT_* variables on exit --- .zsh/func/vcsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.zsh/func/vcsh b/.zsh/func/vcsh index cd6d205..b9f4b5d 100755 --- a/.zsh/func/vcsh +++ b/.zsh/func/vcsh @@ -31,9 +31,17 @@ if [ ! -d "$FGIT_BASE/${1}.git" ]; then return 2 fi +old_GIT_DIR="${GIT_DIR:-}" +old_GIT_WORK_TREE="${GIT_WORK_TREE:-}" + export GIT_DIR="$FGIT_BASE/${1}.git" export GIT_WORK_TREE="$GIT_DIR/$(git config --get core.worktree)" git status -PS1="%S{${0##*/}:$1}%s$PS1" $SHELL -i +PS1="%S{${0##*/}:$1}%s$PS1" $SHELL -i || : + +GIT_DIR="$old_GIT_DIR" +[ -z "$GIT_DIR" ] && unset GIT_DIR +GIT_WORK_TREE="$old_GIT_WORK_TREE" +[ -z "$GIT_WORK_TREE" ] && unset GIT_WORK_TREE -- 2.39.5 From b1370ab382637f6767382c54d8e97fb8f0895a0a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 17 Jun 2008 10:19:33 +0200 Subject: [PATCH 15/16] use mtail for tailing files if available --- .zsh/zshrc/30_aliases | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 2817fdc..d6617fc 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -73,7 +73,9 @@ compdef _doc doc alias giti='git init && git add . && git commit -minitial\ checkin' -if whence tailf >/dev/null; then +if whence mtail >/dev/null; then + alias t=mtail +elif whence tailf >/dev/null; then alias t=tailf else alias t='tail -f' -- 2.39.5 From 1edf3ccaf2250a42f75b6e56db0a1df3dbcd9c23 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 19 Jun 2008 10:53:12 +0200 Subject: [PATCH 16/16] also set $LANGUAGE --- .zsh/zprofile/10_locale | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zsh/zprofile/10_locale b/.zsh/zprofile/10_locale index 07cbf44..9280f7a 100644 --- a/.zsh/zprofile/10_locale +++ b/.zsh/zprofile/10_locale @@ -98,6 +98,8 @@ if [ -x =locale ]; then unset _LOCALE fi +export LANGUAGE="${LANG}:en" + unfunction _set_regional_locale unfunction _set_locale -- 2.39.5