summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zsh/20_Variables.Vélizy9
-rw-r--r--.zshrc22
-rw-r--r--00_Preambule.zsh9
-rw-r--r--10_Options.zsh20
-rw-r--r--20_Variables.paranoid15
-rw-r--r--20_Variables.prunelle9
-rw-r--r--20_Variables.zsh11
-rw-r--r--25_Prompts.zsh9
-rw-r--r--30_Completion.zsh13
-rw-r--r--40_KeyBindings.zsh233
-rw-r--r--70_Aliases.paranoid9
-rw-r--r--70_Aliases.prunelle9
-rw-r--r--70_Aliases.zsh9
-rw-r--r--80_Functions.zsh9
-rw-r--r--85_Debug.zsh9
-rw-r--r--99_Start.zsh9
16 files changed, 321 insertions, 83 deletions
diff --git a/.zsh/20_Variables.Vélizy b/.zsh/20_Variables.Vélizy
index c3a2a62..00b5ab3 100644
--- a/.zsh/20_Variables.Vélizy
+++ b/.zsh/20_Variables.Vélizy
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
export PATH=${PATH:+$PATH:}~/souche/tools/bin:/usr/local/urd2/bin:/usr/local/urd2/openrg2_6/mips-linux-uclibc/bin/
export MANPATH=${MANPATH:+$MANPATH:}/usr/local/urd2/man:~/souche/tools/man:~/souche/tools/share/man
diff --git a/.zshrc b/.zshrc
index 6146ac6..64503a3 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,5 +1,27 @@
+
ZDOTDIR=~/.zsh
+##
+## THIS FILE IS NOT INTENDED TO BE MODIFIED ! READ ABOVE...
+##
+## Instead, add/edit your configuration files inside $ZDOTDIR.
+##
+## If you want to add a file, name it specifically in the form
+##
+## $ZDOTDIR/??_*.zsh
+##
+## Where "??" should be a two-digits number.
+## With that, file ``10_Toto.zsh'' would be parsed before
+## file ``20_Tutu.zsh'', allowing you to organize your scripts.
+##
+## If you want to make host-specific configurations, create a
+## file named with the root of your configuration file, and
+## append to it ".$(hostname -s)". (replace "zsh" by the hostname.
+## if you have a computer named "zsh", well....... :-) )
+## For example, for specific configuration for the host HAL in
+## the file 10_Toto.zsh, you would create a file named 10_Toto.HAL
+##
+
if [ -d $ZDOTDIR ]; then
for script in $ZDOTDIR/??_*.zsh
do
diff --git a/00_Preambule.zsh b/00_Preambule.zsh
index fd52ce7..b3d794e 100644
--- a/00_Preambule.zsh
+++ b/00_Preambule.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
## No more core dumps :)
ulimit -c 0
umask 002
diff --git a/10_Options.zsh b/10_Options.zsh
index bec3477..f9f665f 100644
--- a/10_Options.zsh
+++ b/10_Options.zsh
@@ -1,8 +1,17 @@
#!/bin/zsh
+##
+## 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.
+##
## Zsh options
#
-# zshoptions(1)
+# see man zshoptions(1) for more details ;-)
#
# J'ai pas très bien compris mais en gros ça va me permettre
@@ -19,6 +28,7 @@ unsetopt All_Export
## ``cd'' automatique
# Si la commande n'existe pas et qu'elle correspond à
# un dossier, zsh fait automatiquement un ``cd'' dessus.
+# Pour les fainéants qui ont la flemme de taper "cd " :-)
setopt Auto_Cd
## Envoie le signal CONT aux jobs passés en arrière-plan.
@@ -26,8 +36,11 @@ setopt Auto_Continue
## Complétion automatique
setopt Auto_List
-unsetopt Auto_Menu
-setopt Menu_Complete
+setopt Auto_Menu
+# Ces trucs sont pénibles car ils n'autorisent pas une
+# complétion "petit à petit".
+unsetopt Menu_Complete
+unsetopt Rec_Exact
setopt Auto_Param_Keys
unsetopt Auto_Param_Slash
@@ -61,3 +74,4 @@ setopt No_Prompt_Cr
setopt Numeric_Glob_Sort
unsetopt Prompt_Cr
setopt Pushd_Ignore_Dups
+setopt Glob
diff --git a/20_Variables.paranoid b/20_Variables.paranoid
index fdb0660..07f3bad 100644
--- a/20_Variables.paranoid
+++ b/20_Variables.paranoid
@@ -1,3 +1,12 @@
-#!/bin/zsh
-#export PRINTER=Gertrude
-export PRINTER=Berthe
+#!/bin/zsh
+##
+## 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.
+##
+#export PRINTER=Gertrude
+export PRINTER=Berthe
diff --git a/20_Variables.prunelle b/20_Variables.prunelle
index 3246375..b96764f 100644
--- a/20_Variables.prunelle
+++ b/20_Variables.prunelle
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
if ( [ "`uname -s`" = "Darwin" ] )
then
diff --git a/20_Variables.zsh b/20_Variables.zsh
index dc6266a..86a4093 100644
--- a/20_Variables.zsh
+++ b/20_Variables.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
##
## NDLA:
@@ -22,7 +31,7 @@ export PAGER=less
## Quelle commande utiliser par défaut ?
export NULLCMD=cat
-which dircolors 2>&1 >/dev/null && eval $(dircolors ~/.dir_colors 2>&-)
+[ `which dircolors` ] && eval $(dircolors ~/.dir_colors 2>&-)
export TZ="Europe/Paris"
export TIME_STYLE="+%Y-%b-%d %H:%M"
diff --git a/25_Prompts.zsh b/25_Prompts.zsh
index 2dbf1e5..c2ba379 100644
--- a/25_Prompts.zsh
+++ b/25_Prompts.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
## Prompts
#
diff --git a/30_Completion.zsh b/30_Completion.zsh
index 42dc660..374ecdb 100644
--- a/30_Completion.zsh
+++ b/30_Completion.zsh
@@ -1,12 +1,23 @@
#!/bin/zsh
-# Fichier de conf pour la personnalisation de la complétion automagique :-)
+##
+## 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.
+##
+# Fichier de conf pour la personnalisation de la complÃtion automagique :-)
# Hugues HIEGEL <hugues@nullpart.net>
# jeu mar 3 10:00:44 CET 2005
autoload -U compinit 2> /dev/null
compinit -i
+## Affiche le menu de sÃlection si au moins 2 entrÃes sont possibles
zstyle ':completion:*' menu select=2
+## Utilise les couleurs définies avec dircolors
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# Premiers essais...
diff --git a/40_KeyBindings.zsh b/40_KeyBindings.zsh
index 1f6cd14..0c0fa99 100644
--- a/40_KeyBindings.zsh
+++ b/40_KeyBindings.zsh
@@ -1,22 +1,28 @@
#!/bin/zsh
+##
+## 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.
+##
## Key bindings
#
# Lancez un chtit bindkey dans votre zsh pour voir...
#
-bindkey "" backward-delete-word
-bindkey "" backward-delete-char
-
-bindkey "\e[3~" delete-char # delete
-bindkey "\e[2~" overwrite-mode # insert
-bindkey "\e[A" up-line-or-history # up
-bindkey "\e[B" down-line-or-history # down
+bindkey "[3~" delete-char # delete
+bindkey "[2~" overwrite-mode # insert
+bindkey "" up-line-or-history # up
+bindkey "" down-line-or-history # down
bindkey "" history-search-backward # META-up
bindkey "" history-search-forward # META-down
-bindkey "\e\e[C" forward-word # ESC right
-bindkey "\e\e[D" backward-word # ESC left
-bindkey "\e\e[3~" kill-region # ESC del
+bindkey "" forward-word # ESC right
+bindkey "" backward-word # ESC left
+bindkey "[3~" kill-region # ESC del
# Pratique pour rehasher rapidement
bindkey -s "r" "rehash\n"
@@ -24,95 +30,172 @@ bindkey -s "R" "rehash\n"
test $TERM = "rxvt" -o $TERM = "xterm" -o $TERM = "aterm" &&
{
- bindkey "\e[1~" beginning-of-line # home
- bindkey "\e[4~" end-of-line # end-of-line
- bindkey "\eOc" forward-word # CTRL right
- bindkey "\eOd" backward-word # CTRL left
- bindkey "\e[3$" vi-set-buffer # SHIFT del
- bindkey "\eOa" history-search-backward # CTRL UP
- bindkey "\eOb" history-search-forward # CTRL DOWN
+ bindkey "[1~" beginning-of-line # home
+ bindkey "[4~" end-of-line # end-of-line
+ bindkey "Oc" forward-word # CTRL right
+ bindkey "Od" backward-word # CTRL left
+ bindkey "[3$" vi-set-buffer # SHIFT del
+ bindkey "Oa" history-search-backward # CTRL UP
+ bindkey "Ob" history-search-forward # CTRL DOWN
}
# (gnome-terminal)
test $TERM = "xterm" &&
{
- bindkey "\eOH" beginning-of-line # home
- bindkey "\eOF" end-of-line # end-of-line
+ bindkey "OH" beginning-of-line # home
+ bindkey "OF" end-of-line # end-of-line
}
-
-bindkey "[8~" end-of-line
-bindkey "[7~" beginning-of-line
-bindkey "[6~" down-line-or-history
-bindkey "[5~" up-line-or-history
-bindkey "[3~" delete-char
-bindkey "[2~" undefined-key
-bindkey "[3~" delete-word
-bindkey "" backward-delete-char
-bindkey "" backward-delete-word
-
#bindkey "\C-t" gosmacs-transpose-chars # J, ca c'est un truc pour toi
# ne pas oublier de s'en servir :
# vi-match-bracket est sur ^X^B par defaut
# npo : quote-region est sur ESC-" par defaut
# npo : which-command est sur ESC-? par defaut
# Lancez ``bindkey'' pour en savoir plus !!
-bindkey "^A"-"^C" self-insert
-bindkey "^D" list-choices
-bindkey "^E"-"^F" self-insert
-bindkey "^G" list-expand
-bindkey "^H" vi-backward-delete-char
+
+## Résultat d'un ``bindkey''
+
+bindkey "^@" set-mark-command
+bindkey "^A" beginning-of-line
+bindkey "^B" backward-char
+bindkey "^D" delete-char-or-list
+bindkey "^E" end-of-line
+bindkey "^F" forward-char
+bindkey "^G" send-break
+bindkey "^H" backward-delete-char
bindkey "^I" expand-or-complete
bindkey "^J" accept-line
-bindkey "^K" self-insert
+bindkey "^K" kill-line
bindkey "^L" clear-screen
bindkey "^M" accept-line
-bindkey "^N"-"^P" self-insert
-bindkey "^Q" vi-quoted-insert
-bindkey "^R" redisplay
-bindkey "^S"-"^T" self-insert
-bindkey "^U" vi-kill-line
-bindkey "^V" vi-quoted-insert
-bindkey "^W" vi-backward-kill-word
-bindkey "^X" self-insert
+bindkey "^N" down-line-or-history
+bindkey "^O" accept-line-and-down-history
+bindkey "^P" up-line-or-history
+bindkey "^Q" push-line
+bindkey "^R" history-incremental-search-backward
+bindkey "^S" history-incremental-search-forward
+bindkey "^T" transpose-chars
+bindkey "^U" kill-whole-line
+bindkey "^V" quoted-insert
+bindkey "^W" backward-kill-word
+bindkey "^X^B" vi-match-bracket
+bindkey "^X^F" vi-find-next-char
+bindkey "^X^J" vi-join
+bindkey "^X^K" kill-buffer
+bindkey "^X^N" infer-next-history
+bindkey "^X^O" overwrite-mode
bindkey "^X^R" _read_comp
+bindkey "^X^U" undo
+bindkey "^X^V" vi-cmd-mode
+bindkey "^X^X" exchange-point-and-mark
+bindkey "^X*" expand-word
+bindkey "^X=" what-cursor-position
bindkey "^X?" _complete_debug
bindkey "^XC" _correct_filename
+bindkey "^XG" list-expand
bindkey "^Xa" _expand_alias
bindkey "^Xc" _correct_word
bindkey "^Xd" _list_expansions
bindkey "^Xe" _expand_word
+bindkey "^Xg" list-expand
bindkey "^Xh" _complete_help
bindkey "^Xm" _most_recent_file
bindkey "^Xn" _next_tags
+bindkey "^Xr" history-incremental-search-backward
+bindkey "^Xs" history-incremental-search-forward
bindkey "^Xt" _complete_tag
+bindkey "^Xu" undo
bindkey "^X~" _bash_list-choices
-bindkey "^Y"-"^Z" self-insert
-bindkey "^[" vi-cmd-mode
-bindkey "^[^[[3~" kill-region
-bindkey "^[^[[A" history-search-backward
-bindkey "^[^[[B" history-search-forward
-bindkey "^[^[[C" forward-word
-bindkey "^[^[[D" backward-word
-bindkey "^[," _history-complete-newer
-bindkey "^[/" _history-complete-older
-bindkey "^[OA" vi-up-line-or-history
-bindkey "^[OB" vi-down-line-or-history
-bindkey "^[OC" vi-forward-char
-bindkey "^[OD" vi-backward-char
-bindkey "^[R" "rehash^J"
-bindkey "^[[2~" overwrite-mode
-bindkey "^[[3~" delete-char
-bindkey "^[[A" up-line-or-history
-bindkey "^[[B" down-line-or-history
-bindkey "^[[C" vi-forward-char
-bindkey "^[[D" vi-backward-char
-bindkey "^[r" "rehash^J"
-bindkey "^[~" _bash_complete-word
-bindkey "^\\\\"-"~" self-insert
-bindkey "^?" vi-backward-delete-char
-bindkey "\M-^@"-"\M-^?" self-insert
-bindkey "^D" delete-char
-bindkey "^H" vi-backward-delete-char
-bindkey "^[[3~" delete-char
-bindkey "^[d" delete-word
-bindkey "^[^?" backward-delete-word
-bindkey "^?" vi-backward-delete-char
+bindkey "^Y" yank
+bindkey "^D" list-choices
+bindkey "^G" send-break
+bindkey "^H" backward-kill-word
+bindkey "^I" self-insert-unmeta
+bindkey "^J" self-insert-unmeta
+bindkey "^L" clear-screen
+bindkey "^M" self-insert-unmeta
+bindkey "[3~" kill-region
+bindkey "" history-search-backward
+bindkey "" history-search-forward
+bindkey "" forward-word
+bindkey "" backward-word
+bindkey "^_" copy-prev-word
+bindkey " " magic-space
+bindkey "!" expand-history
+bindkey "\"" quote-region
+bindkey "\$" spell-word
+bindkey "'" quote-line #'"
+bindkey "," _history-complete-newer
+bindkey "-" neg-argument
+bindkey "." insert-last-word
+bindkey "/" _history-complete-older
+bindkey "0" digit-argument
+bindkey "1" digit-argument
+bindkey "2" digit-argument
+bindkey "3" digit-argument
+bindkey "4" digit-argument
+bindkey "5" digit-argument
+bindkey "6" digit-argument
+bindkey "7" digit-argument
+bindkey "8" digit-argument
+bindkey "9" digit-argument
+bindkey "<" beginning-of-buffer-or-history
+bindkey ">" end-of-buffer-or-history
+bindkey "?" which-command
+bindkey "A" accept-and-hold
+bindkey "B" backward-word
+bindkey "C" capitalize-word
+bindkey "D" kill-word
+bindkey "F" forward-word
+bindkey "G" get-line
+bindkey "H" run-help
+bindkey "L" down-case-word
+bindkey "N" history-search-forward
+bindkey "OA" up-line-or-history
+bindkey "OB" down-line-or-history
+bindkey "OC" forward-char
+bindkey "OD" backward-char
+bindkey "P" history-search-backward
+bindkey "Q" push-line
+bindkey "S" spell-word
+bindkey "T" transpose-words
+bindkey "U" up-case-word
+bindkey "W" copy-region-as-kill
+bindkey "[1~" beginning-of-line
+bindkey "[2~" overwrite-mode
+bindkey "[3~" delete-char
+bindkey "[4~" end-of-line
+bindkey "[5~" history-beginning-search-backward-end
+bindkey "[6~" history-beginning-search-forward-end
+bindkey "" up-line-or-history
+bindkey "" down-line-or-history
+bindkey "" forward-char
+bindkey "" backward-char
+bindkey "_" insert-last-word
+bindkey "a" accept-and-hold
+bindkey "b" backward-word
+bindkey "c" capitalize-word
+bindkey "d" kill-word
+bindkey "f" forward-word
+bindkey "g" get-line
+bindkey "h" run-help
+bindkey "l" down-case-word
+bindkey "n" history-search-forward
+bindkey "p" history-search-backward
+bindkey "q" push-line
+bindkey "s" spell-word
+bindkey "t" transpose-words
+bindkey "u" up-case-word
+bindkey "w" copy-region-as-kill
+bindkey "x" execute-named-cmd
+bindkey "y" yank-pop
+bindkey "z" execute-last-named-cmd
+bindkey "|" vi-goto-column
+bindkey "~" _bash_complete-word
+bindkey "^?" backward-kill-word
+bindkey "^\" up-history
+bindkey "^\" down-history
+bindkey "^\" forward-char
+bindkey "^\" backward-char
+bindkey "^_" undo
+bindkey " "-"~" self-insert
+bindkey "" backward-delete-char
+bindkey "\M-^@"-"\M-" self-insert
diff --git a/70_Aliases.paranoid b/70_Aliases.paranoid
index 283316c..986ad6b 100644
--- a/70_Aliases.paranoid
+++ b/70_Aliases.paranoid
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
## Paranoid specifics aliases
diff --git a/70_Aliases.prunelle b/70_Aliases.prunelle
index f809d35..900e335 100644
--- a/70_Aliases.prunelle
+++ b/70_Aliases.prunelle
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
a port='sudo port'
a ls='ls -FG'
a aless='open -a /Applications/DarwinPorts/AquaLess.app'
diff --git a/70_Aliases.zsh b/70_Aliases.zsh
index 34cea17..fd4c66d 100644
--- a/70_Aliases.zsh
+++ b/70_Aliases.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
alias a='alias'
a una=unalias
diff --git a/80_Functions.zsh b/80_Functions.zsh
index 9bdfc60..8940c9e 100644
--- a/80_Functions.zsh
+++ b/80_Functions.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
[[ -t 1 ]] &&
chpwd()
diff --git a/85_Debug.zsh b/85_Debug.zsh
index 08158de..4f245af 100644
--- a/85_Debug.zsh
+++ b/85_Debug.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
cd_back() {
# for folder in $@
diff --git a/99_Start.zsh b/99_Start.zsh
index e44fc29..32d23c7 100644
--- a/99_Start.zsh
+++ b/99_Start.zsh
@@ -1,4 +1,13 @@
#!/bin/zsh
+##
+## 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.
+##
## Hop on rafraîchit le titre de la fenêtre
chpwd