summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2006-09-23 11:49:54 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:10 +0100
commit677e279659989347460af25ff52c7b3554efb843 (patch)
tree42eb491ca791fb1b4c74e6055f7a1f573b654bd7
parent2052b6ba7ecd7ba7a719a8826cdfc1a1a228cafc (diff)
=?utf-8?q?Nombreuses=20mises=20=C3=A0=20jour,
=20en=20particulier=20les=20couleurs=20du=20prompt=20yAy?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.5.4.1" This is a multi-part message in MIME format. --------------1.5.4.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@273 a0e5b806-a6f9-0310-978d-cbce73f8a913
-rw-r--r--.todo3
-rw-r--r--.zlogin2
-rw-r--r--00_Preamble.zsh1
-rw-r--r--10_Options.zsh2
-rw-r--r--20_Environment.zsh10
-rw-r--r--25_Prompts.zsh64
-rw-r--r--30_Completion.zsh3
-rw-r--r--50_Hashes.zsh9
-rw-r--r--70_Aliases.zsh14
-rw-r--r--80_Functions.zsh3
-rw-r--r--85_Debug.zsh1
-rw-r--r--99_Start.zsh4
-rw-r--r--host:paranoid/Environment.zsh6
-rw-r--r--net:coframi-velizy.com/Environment.zsh16
-rw-r--r--net:coframi-velizy.com/Hashes.zsh11
15 files changed, 82 insertions, 67 deletions
diff --git a/.todo b/.todo
index dae2fbd..9ceb4a2 100644
--- a/.todo
+++ b/.todo
@@ -1,4 +1,5 @@
-<todo version="0.1.19">
+<!-- Automagically generated by the ToDo program on Fri Sep 8 13:48:24 2006 -->
+<todo version="0.1.18">
<title>
Zsh
</title>
diff --git a/.zlogin b/.zlogin
index 7ae436e..ef67c4b 100644
--- a/.zlogin
+++ b/.zlogin
@@ -2,6 +2,6 @@
[ -f $ZDOTDIR/user:`whoami`/zlogin ] && source $ZDOTDIR/user:`whoami`/zlogin
[ -f $ZDOTDIR/.keychain ] && source $ZDOTDIR/.keychain
-which keychain 2>&1 >/dev/null && keychain --quiet --stop others --inherit any
+which keychain >/dev/null 2>&1 && keychain --quiet --stop others --inherit any
#keychain --quiet --quick id_dsa
#keychain --quiet --quick 593F1F92
diff --git a/00_Preamble.zsh b/00_Preamble.zsh
index b3d794e..5c28439 100644
--- a/00_Preamble.zsh
+++ b/00_Preamble.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
diff --git a/10_Options.zsh b/10_Options.zsh
index acc3142..4d35898 100644
--- a/10_Options.zsh
+++ b/10_Options.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -73,5 +72,6 @@ setopt No_Hup
setopt No_Prompt_Cr
setopt Numeric_Glob_Sort
unsetopt Prompt_Cr
+setopt Auto_Pushd
setopt Pushd_Ignore_Dups
setopt Glob
diff --git a/20_Environment.zsh b/20_Environment.zsh
index 80b1501..252083a 100644
--- a/20_Environment.zsh
+++ b/20_Environment.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -33,7 +32,7 @@ export NULLCMD=cat
[ `which dircolors` >/dev/null 2>&1 ] && eval $(dircolors ~/.dir_colors 2>&-)
export TZ="Europe/Paris"
-export TIME_STYLE="+%Y-%b-%d %H:%M.%S"
+export TIME_STYLE="+%Y-%b-%d %H:%M:%S"
## Agent de clefs SSH/GPG
# En principe il a été fait dans le .zlogin, mais si on n'est pas en
@@ -51,11 +50,12 @@ unset LANG # Unuseful
# si et seulement si $VARIABLE contient déjà des choses, cela pour éviter
# d'avoir un PATH (p.e.) de la forme : PATH=:/bin
#
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}~/libs
-export PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}/usr/X11R6/lib/pkgconfig
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:~/libs
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/X11R6/lib/pkgconfig
export PATH=$PATH:~/sbin:~/bin
+[ `id -u` -lt 100 ] && PATH=/sbin:/usr/sbin:$PATH
export MANPATH=$MANPATH:~/man
-export INFOPATH=${INFOPATH:+$INFOPATH:}~/info
+export INFOPATH=$INFOPATH:~/info
## Nettoyage des précédentes variables pour supprimer les duplicata
typeset -gU PATH MANPATH INFOPATH PKG_CONFIG_PATH LD_LIBRARY_PATH
diff --git a/25_Prompts.zsh b/25_Prompts.zsh
index 7309d7f..0bcf67a 100644
--- a/25_Prompts.zsh
+++ b/25_Prompts.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -9,30 +8,25 @@
## these files with or without this notice.
##
+VOID=0
+BOLD=1
+UNDERLINE=4
+RED=31
+GREEN=32
+YELLOW=33
+BLUE=34
+MAGENTA=35
+CYAN=36
+WHITE=37
+
# Pour personnaliser les couleurs du prompt, configurez ces variables :
# - PS1_ROOT pour la couleur du prompt ROOT
# - PS1_USER pour la couleur du prompt USER local
# - PS1_USER_SSH pour la couleur du prompt USER distant
-C_="%{["
-_C="m%}"
-
-COLOR_RSET=0
-COLOR_BOLD=1
-COLOR_LINE=4
-COLOR_RED=31
-COLOR_GREEN=32
-COLOR_YELLOW=33
-COLOR_BLUE=34
-COLOR_MAGENTA=35
-COLOR_CYAN=36
-
-## Couleur par défaut pour le prompt ROOT (c'est super pour sudo, ça...)
-PS1_ROOT=${PS1_ROOT:-$COLOR_RED}
-
-# Couleur par défaut pour les utilisateurs normaux (moi, quoi)
-PS1_USER=${PS1_USER:-$COLOR_BLUE}
-PS1_USER_SSH=${PS1_USER_SSH:-$COLOR_MAGENTA}
+PS1_ROOT=$RED
+PS1_USER=$BLUE
+PS1_USER_SSH=$MAGENTA
if ( [ "$SSH_TTY" != "" ] )
then
@@ -42,19 +36,19 @@ then
PS1_USER=${PS1_USER_SSH:-$PS1_USER}
fi
-PS1_COLOR="%(!.$PS1_ROOT.$PS1_USER)"
-
-# COULEURS DU PROMPT
-# La classe.
-
-PATHCOLOR="$C_$COLOR_RSET;$PS1_COLOR$_C"
-USERCOLOR="$C_$COLOR_RSET;$PS1_COLOR$_C"
-HOSTCOLOR="$C_$COLOR_RSET;$PS1_COLOR$_C"
-TERMCOLOR="$C_$COLOR_RSET;$COLOR_CYAN$_C"
-ERRRCOLOR="$C_$COLOR_RED$_C"
-RESET="$C_$COLOR_RSET$_C"
-MISC="$C_$COLOR_RSET;$COLOR_BOLD;$PS1_COLOR$_C"
+## Les couleurs !! ##
+C_="%{["
+_C="m%}"
+COLOR_PATH="0;%(!.$PS1_ROOT.$BOLD;$PS1_USER)"
+COLOR_TERM="0;%(!.$PS1_ROOT.$PS1_USER)"
+COLOR_USER="0;%(!.$PS1_ROOT.$PS1_USER)"
+COLOR_HOST="0;%(!.$PS1_ROOT.$PS1_USER)"
+COLOR_HIST=$VOID
+COLOR_AROB="0;1;%(!.$BOLD;$PS1_ROOT.$PS1_USER)"
+COLOR_DIES="0;%(!.$BOLD;$PS1_ROOT.$PS1_USER)"
+COLOR_ERRR="$BOLD;$RED"
+COLOR_DATE="0;%(!.$PS1_ROOT.$PS1_USER)"
## Prompts
#
@@ -69,7 +63,7 @@ MISC="$C_$COLOR_RSET;$COLOR_BOLD;$PS1_COLOR$_C"
# Affiche l'user, l'host, le tty et le pwd. Rien que ça...
# Note que pour le pwd, on n'affiche que les 4 derniers dossiers pour éviter
# de pourrir le fenêtre de terminal avec un prompt à rallonge.
-PS1=$USERCOLOR"%n"$MISC"@"$HOSTCOLOR"%m"$RESET" ("$TERMCOLOR"%y"$RESET") ["$PATHCOLOR"%(!.%d.%(5~:.../%4~:%~))"$RESET"]"${LD_PRELOAD:t:s/lib//:r}" %h"$MISC"#"$RESET" "
+PS1=""$C_$COLOR_USER$_C"%n"$C_$COLOR_AROB$_C"@"$C_$COLOR_HOST$_C"%m"$C_$VOID$_C" ("$C_$COLOR_TERM$_C"%y"$C_$VOID$_C") ["$C_$COLOR_PATH$_C"%(!.%d.%(5~:.../:)%4~)"$C_$VOID$_C"]"${LD_PRELOAD:t:s/lib//:r}" "$C_$COLOR_HIST$_C"%h"$C_$COLOR_DIES$_C"#"$C_$VOID$_C" "
# Prompt level 2
PS2="%{%}%B%_%b%{%}%B>%b%{%} "
@@ -81,8 +75,8 @@ PS3="?# "
PS4="+%N:%i> "
# Prompt de droite, pour l'heure et le code d'erreur de la dernière commande
-RPS1="%(?..$ERRRCOLOR%?$COLOR_RSET) %{[0;%(!."$PS1_ROOT"."$PS1_USER")m%}%D{%a%d%b|%H:%M\'%S}%{%}"
+RPS1="%(?;;"$C_$COLOR_ERRR$_C"%?"$C_$VOID$_C") "$C_$COLOR_DATE$_C"%D{%H:%M:%S %d/%m/%Y}"$C_$VOID$_C""
# Ultime : prompt de correction :-)
-SPROMPT="zsh: %{%}%B«%R»%b%{%} ? Vous ne vouliez pas plutôt %{%}%B«%r»%b%{%} ? [%BN%byae] "
+SPROMPT="zsh: $_C_$BLUE$_C%B'%R'%b%C_$VOID$_C ? Vous ne vouliez pas plutôt $C_$MAGENTA$_C%B'%r'%b$C_$VOID$_C ? [%BN%byae] "
diff --git a/30_Completion.zsh b/30_Completion.zsh
index 374ecdb..b0104b8 100644
--- a/30_Completion.zsh
+++ b/30_Completion.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -60,4 +59,4 @@ zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
)'
# ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
-
+zstyle -e ':completion:*:quilt:*' command 'quilt help|tail -n +4|head -6'
diff --git a/50_Hashes.zsh b/50_Hashes.zsh
index e69de29..4564729 100644
--- a/50_Hashes.zsh
+++ b/50_Hashes.zsh
@@ -0,0 +1,9 @@
+##
+## Part of configuration files for Zsh 4
+## by Hugues Hiegel <hugues@nullpart.net>
+##
+## NO WARRANTY PROVIDED, USE AT YOUR OWN RISKS
+##
+## You are encouraged to use, modify, and redistribute
+## these files with or without this notice.
+##
diff --git a/70_Aliases.zsh b/70_Aliases.zsh
index 9293784..1f110dd 100644
--- a/70_Aliases.zsh
+++ b/70_Aliases.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -10,6 +9,12 @@
##
alias a='alias'
+a -g DEVNULL='>/dev/null 2>&1'
+a -g NOTROOT='[ "`whoami`" != "root" ] && '
+
+a -g ASCII='LC_ALL=fr_FR'
+a -g UNICODE='LC_ALL=fr_FR.UTF-8'
+
a una=unalias
a e='emacsclient'
@@ -24,7 +29,7 @@ a mv='mv -i'
autoload zmv
a mmv='noglob zmv -W'
-a apt-get='sudo apt-get'
+NOTROOT which apt-get DEVNULL && a apt-get='sudo apt-get'
a rt='find . -type f \( -name "*~" -o -name ".*~" -o -name "#*#" \) -exec rm -vf \{\} \;'
@@ -55,3 +60,8 @@ a dosbox='dosbox -c "mount c \"`pwd`\"" -c "mount d /cdrom -t cdrom" -c "c:" '
a gnus='emacs -f gnus'
#a make='make -j'
+
+## Suffixes Aliases
+a -s patch=editdiff
+a -s c=$EDITOR
+a -s h=$EDITOR
diff --git a/80_Functions.zsh b/80_Functions.zsh
index add97cf..02d9fa4 100644
--- a/80_Functions.zsh
+++ b/80_Functions.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -28,7 +27,7 @@ _chpwd()
chpwd()
{
_chpwd
- which todo 2>&1 > /dev/null && todo
+ which todo > /dev/null 2>&1 && todo
}
precmd ()
diff --git a/85_Debug.zsh b/85_Debug.zsh
index 53ff080..8fb3c21 100644
--- a/85_Debug.zsh
+++ b/85_Debug.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
diff --git a/99_Start.zsh b/99_Start.zsh
index e6720ed..dfc4b65 100644
--- a/99_Start.zsh
+++ b/99_Start.zsh
@@ -1,4 +1,3 @@
-#!/bin/zsh
##
## Part of configuration files for Zsh 4
## by Hugues Hiegel <hugues@nullpart.net>
@@ -10,5 +9,4 @@
##
## Hop on rafraîchit le titre de la fenêtre
-term_title
-todo veryhigh
+chpwd
diff --git a/host:paranoid/Environment.zsh b/host:paranoid/Environment.zsh
index 8cc126e..07f3bad 100644
--- a/host:paranoid/Environment.zsh
+++ b/host:paranoid/Environment.zsh
@@ -10,9 +10,3 @@
##
#export PRINTER=Gertrude
export PRINTER=Berthe
-
-export MANPATH=:$MANPATH
-export PATH=:$PATH
-export INFOPATH=:$INFOPATH
-
-typeset -gU PATH MANPATH INFOPATH PKG_CONFIG_PATH LD_LIBRARY_PATH
diff --git a/net:coframi-velizy.com/Environment.zsh b/net:coframi-velizy.com/Environment.zsh
index 9569dee..27997ce 100644
--- a/net:coframi-velizy.com/Environment.zsh
+++ b/net:coframi-velizy.com/Environment.zsh
@@ -9,12 +9,24 @@
## these files with or without this notice.
##
+## Mettez le nom de votre station de travail habituelle ici ##
+if { ! -e ~/.workstation ]
+then
+ echo >&2 "Quelle est votre station de travail attitrée ? (`hostname -s`) " && read $workstation
+ echo ${workstation:-$(hostname -s)} > ~/.workstation
+fi
+WORKSTATION=$(cat ~/.workstation)
+
+export LC_ALL=fr_FR
+[ "$TERM" = "rxvt-unicode" ] && export TERM=rxvt
+
#export PATH=${PATH:+$PATH:}~/souche_linux_pl/tools/bin:/usr/local/urd2/bin:/usr/local/urd2/openrg2_6/mips-linux-uclibc/bin/
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}~/souche_linux_pl/tools/lib
#export MANPATH=${MANPATH:+$MANPATH:}/usr/local/urd2/man:~/souche_linux_pl/tools/man:~/souche_linux_pl/tools/share/man
-#PATH=$PATH:/opt/openrg/mips-linux-uclibc/bin
-#typeset -gU PATH MANPATH
+PATH=$PATH:/opt/edtm/bin
+PATH=$PATH:/opt/openrg/mips-linux-uclibc/bin
+typeset -gU PATH MANPATH
#__PREFIX=/filer1/dev_users/hiegel/souche_linux_pl/tools/
diff --git a/net:coframi-velizy.com/Hashes.zsh b/net:coframi-velizy.com/Hashes.zsh
index c869707..ef2666f 100644
--- a/net:coframi-velizy.com/Hashes.zsh
+++ b/net:coframi-velizy.com/Hashes.zsh
@@ -1,5 +1,6 @@
-
-hash -d dev=/developpement/nes/sagem-box/hhiegel
-hash -d public=/public/nes
-hash -d tftp=~public/pc-test/tftp/
-
+hash -d dev=/developpement/$WORKSTATION/sagem-box/$(whoami)
+hash -d public=/public/$WORKSTATION
+hash -d Public=/public/$(hostname -s)
+hash -d archives=/projets/sagem-box/archives
+hash -d doc=/projets/sagem-box/doc
+hash -d tftp=/public/$WORKSTATION/tftp