From e65664fdf280a632292789ee0a11235dffd67200 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 16 Apr 2020 22:25:27 +0200 Subject: [PATCH 1/7] Remove (semi)obsolete hostnames --- .zshenv | 60 --------------------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/.zshenv b/.zshenv index 83f2afe..e9bacb1 100644 --- a/.zshenv +++ b/.zshenv @@ -191,23 +191,8 @@ case "$FQDN" in *.hjp.at) export NNTPSERVER=news.luga.at ;; - *.wsr.ac.at) - export NNTPSERVER=news.wsr.ac.at - ;; esac -case "$FQDN" in - pashkan.wsr.ac.at) - export LD_LIBRARY_PATH=`preppath -v LD_LIBRARY_PATH /usr/local/lib` - ;; - hrunkner.hjp.at) - export LD_LIBRARY_PATH=`apppath -v LD_LIBRARY_PATH /usr/lib/jni` - ;; - *.wsr.ac.at) - ;; -esac - - export TABLE_DELIMITER='|' if [ -d /usr/local/pgsql/data/ ] @@ -237,36 +222,6 @@ then fi case "$FQDN" in - shalmaneser.wsr.ac.at) - export WZRP_CONN=~/.dbi/fiwssd - ;; - pashkan.wsr.ac.at) - export WZRP_CONN=~/.dbi/fiwdevel - ;; - algernon.wsr.ac.at) - export WZRP_CONN=~/.dbi/fiwssd - ;; - enmetena.wsr.ac.at) - export WZRP_CONN=~/.dbi/fiwdevel - ;; -esac - -case "$FQDN" in - shalmaneser.wsr.ac.at|pashkan.wsr.ac.at) - export PERL5LIB=`apppath -c -v PERL5LIB ~/lib/perl5 /usr/local/www/offline/$USER.fiw/lib/perl5 /usr/local/www/offline/dal.fiw/lib/perl5` - PATH=`apppath -c /usr/local/www/offline/$USER.fiw/bin /usr/local/www/offline/dal.fiw/bin` - ;; -esac - -case "$FQDN" in - algernon.wsr.ac.at) - export PGHOST=$FQDN - export PGUSER=fiw - ;; - pashkan.wsr.ac.at) - export PGHOST=$FQDN - export PGUSER=fiw - ;; teleute.wsr.ac.at) export PGHOST=wds.wifo.ac.at ;; @@ -278,26 +233,11 @@ case "$FQDN" in ;; esac -case "$FQDN" in - tsimri.wsr.ac.at) - export GET_PASS_FILES="/home/hjp/wrk/admin/info/pwd_work.gpg /home/hjp/Notes/pw.gpg" - ;; -esac - if [ -f ~/perl5/perlbrew/etc/bashrc ] then source ~/perl5/perlbrew/etc/bashrc fi -case "$FQDN" in - oro.wsr.ac.at) - cleansing=~/wrk/wds/Software/WDS/Module/30_CLEANSING - $(preppath -e -v PYTHONPATH -c $cleansing/lib) - $(preppath -e -v PYTHONPATH -c $cleansing/system/app/extraction) - ;; -esac - - case "$FQDN" in *.wsr.ac.at) if [ -z "$GIT_AUTHOR_EMAIL" ] From a72bbeda6b86471feafc6a10a94c0c564e7334eb Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 16 Apr 2020 22:33:34 +0200 Subject: [PATCH 2/7] Don't set MANPATH All of this looks very obsolete, so I guess it's better to just rely on man defaults. --- .zshenv | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.zshenv b/.zshenv index e9bacb1..eab6097 100644 --- a/.zshenv +++ b/.zshenv @@ -69,34 +69,6 @@ then unsetopt NULL_GLOB fi -if [ -r /etc/MANPATH ] -then - MANPATH=`cat /etc/MANPATH`:$MANPATH -else - ALL_PATH=/usr/local/qmail/man:/usr/man:/usr/local/man:/usr/X11R6/man:/usr/share/man:/usr/local/pgsql/man:/var/qmail/man:/usr/local/rrdtool-1.0.35/man - NEW_PATH="" - - for i in ${(s/:/)ALL_PATH} - do - if test -d "$i" - then - case "$NEW_PATH" in - $i:*|*:$i|*:$i:*) ;; - *) - if test -z "$NEW_PATH" - then - NEW_PATH=$i - else - NEW_PATH=$NEW_PATH:$i - fi - esac - fi - done - MANPATH=$NEW_PATH -fi -export MANPATH - - case "`uname -sr`" in Linux*) export LC_COLLATE=POSIX From 2741a2d5531bdf75b48b46e4fea0260d25d141b7 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 15 Jun 2020 00:38:31 +0200 Subject: [PATCH 3/7] Remove HP-UX specific stuff I don't expect to need that again (almost exactly 4 years after the funeral) --- .zlogin | 6 ------ .zshenv | 5 ----- 2 files changed, 11 deletions(-) diff --git a/.zlogin b/.zlogin index 0921d46..5a75948 100644 --- a/.zlogin +++ b/.zlogin @@ -1,13 +1,7 @@ # -# $Id: .zlogin,v 1.9 2003-08-10 17:09:17 hjp Exp $ -# # this is sourced for login shells after .zshrc # mesg y -if [ "`uname`" = "HP-UX" ] -then - ps -fu $LOGNAME -fi date uptime diff --git a/.zshenv b/.zshenv index eab6097..d3d4c77 100644 --- a/.zshenv +++ b/.zshenv @@ -43,11 +43,6 @@ done if [ -n "$preppath" ] then - if [ -r /etc/PATH ] - then - PATH=$($preppath $(cat /etc/PATH) ) - fi - # first prepend important stuff - in order of increasing priority: setopt NULL_GLOB From 14b83d3cfc80d55684bb027bd05f1c4539f98e72 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Wed, 28 Oct 2020 12:27:35 +0100 Subject: [PATCH 4/7] Unset all locale env variables referring to non-existent locales --- .zshenv | 67 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/.zshenv b/.zshenv index d3d4c77..6758065 100644 --- a/.zshenv +++ b/.zshenv @@ -30,6 +30,47 @@ export DEBEMAIL=hjp@hjp.at export DEB_SIGN_KEYID=4ED25B463C8FC154D8189E64F20E485112FE285D export ACK_COLOR_FILENAME='blue on_white' +# Fix up locale. Must do this early or we get a lot of warnings if a +# locale isn't installed. +# Assume that locale and grep are in the PATH. + +case "`uname -sr`" in +Linux*) + export LC_COLLATE=POSIX + if [ -z "$LANG" ] + then + utf=`locale -a | grep en_US.utf8` + if [ -n "$utf" ] + then + # this is a bit of a hack - + # locale -a advertises the locale as "en_US.utf8", + # but the glibc accepts both "en_US.utf8" and + # "en_US.UTF-8" and xterm recogizes only the latter. + # So we explicitely set the latter, even though that's + # not the canonical name and may break some day. + # + LANG=en_US.UTF-8 + else + # fall back to latin 1. + LANG=en_US.iso88591 + fi + export LANG + fi + for i in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL + do + c=$(eval "echo \$$i") + if [ -n "$c" ] + then + r=$(locale -a | grep "${c/UTF-8/utf8}") + if [ -z "$r" ] + then + unset $i + fi + fi + done + ;; +esac + # don't rely on a sane path at this point: for i in /usr/bin/preppath /usr/local/bin/preppath @@ -64,32 +105,6 @@ then unsetopt NULL_GLOB fi -case "`uname -sr`" in -Linux*) - export LC_COLLATE=POSIX - if [ -z "$LANG" ] - then - utf=`locale -a | grep en_US.utf8` - if [ -n "$utf" ] - then - # this is a bit of a hack - - # locale -a advertises the locale as "en_US.utf8", - # but the glibc accepts both "en_US.utf8" and - # "en_US.UTF-8" and xterm recogizes only the latter. - # So we explicitely set the latter, even though that's - # not the canonical name and may break some day. - # - LANG=en_US.UTF-8 - else - # fall back to latin 1. - LANG=en_US.iso88591 - fi - export LANG - fi - # export LC_TIME=de_AT # don't remember what that was for - ;; -esac - case "$LANG" in *.iso88591) export LESSCHARSET=latin1 From 14dd884ae00d7704867dd61e5cbd6b6f6332bc0a Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 12 Nov 2020 15:10:39 +0100 Subject: [PATCH 5/7] Add subdirecories of ~/bin/hosts to PATH --- .zshenv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index d3d4c77..8bd6777 100644 --- a/.zshenv +++ b/.zshenv @@ -56,7 +56,9 @@ then `$preppath -c -e -r /usr/local/go-1.*/bin` `$preppath -c -e -r $HOME/go/bin` PATH=`$preppath -c $HOME/scripts` - PATH=`$preppath -c $HOME/bin/hosts:$HOME/bin` + PATH=`$preppath -c $HOME/bin` + PATH=`$preppath -c $HOME/bin/hosts` + PATH=`$preppath -c $HOME/bin/hosts/*(/)` # then append less important stuff PATH=`apppath -c /usr/local/www/offline/devel.fiw/bin` From a8caa34f9f1301dc88d977e5e21821054fab9ca4 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 12 Nov 2020 15:11:57 +0100 Subject: [PATCH 6/7] Recognise alternate form of Ctrl-E New versions of xterm can apparently send elaborate escape sequences for modifier-key-combinations (e.g. Ctrl-E) and new versions of vim tell them to do that. So Ctrl-E may now be just ASCII 0x05 or a long sequence and we want both to work. --- .vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.vimrc b/.vimrc index 1df75f3..70cd7ec 100644 --- a/.vimrc +++ b/.vimrc @@ -36,6 +36,7 @@ endif map :cp map :cn map!  >I<yypa/O +map! [27;5;101~ >I<yypa/O autocmd FileType perl let perl_fold=1 autocmd FileType perl syntax on From d87a7a5b0a8f2615c9c846d466924665832eee15 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 12 Nov 2020 15:16:23 +0100 Subject: [PATCH 7/7] Recognize Redmine wiki texts edited with textern. --- .vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.vimrc b/.vimrc index 70cd7ec..a28f8b4 100644 --- a/.vimrc +++ b/.vimrc @@ -50,3 +50,6 @@ autocmd FileType javascript set sw=2 autocmd FileType html set sw=2 autocmd FileType crontab set tw=0 + +autocmd BufRead,BufNewFile redmine*.txt set filetype=textile +autocmd FileType textile set tw=0 linebreak