summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zsh/01_Exports.Vélizy9
-rw-r--r--00_Exports.zsh17
-rw-r--r--00_Preambule.zsh10
l---------01_Exports.VZY080011
-rw-r--r--01_Exports.paranoid3
-rw-r--r--01_Exports.prunelle (renamed from 00_Exports.prunelle)1
-rw-r--r--01_Exports.zsh62
-rw-r--r--02_Aliases.paranoid (renamed from 01_Aliases.paranoid)1
-rw-r--r--02_Aliases.prunelle (renamed from 01_Aliases.prunelle)1
-rw-r--r--02_Aliases.zsh (renamed from 01_Aliases.zsh)9
-rw-r--r--02_Options.zsh44
-rw-r--r--02_Zsh.zsh171
-rw-r--r--03_Completion.zsh1
-rw-r--r--04_KeyBindings.zsh38
-rw-r--r--05_Functions.zsh21
-rw-r--r--50_Debug.zsh (renamed from 99_Debug.zsh)23
-rw-r--r--99_Start.zsh6
17 files changed, 221 insertions, 197 deletions
diff --git a/.zsh/01_Exports.Vélizy b/.zsh/01_Exports.Vélizy
new file mode 100644
index 0000000..e294216
--- /dev/null
+++ b/.zsh/01_Exports.Vélizy
@@ -0,0 +1,9 @@
+#!/bin/zsh
+
+PATH+=:~/souche/tools/bin:/usr/local/urd2/bin:/usr/local/urd2/openrg2_6/mips-linux-uclibc/bin/
+MANPATH+=:/usr/local/urd2/man:~/souche/tools/man
+
+__PREFIX=/filer1/dev_users/hiegel/souche/tools/
+
+# Modification de la couleur du prompt par défaut
+PS1_USER_SSH=33
diff --git a/00_Exports.zsh b/00_Exports.zsh
deleted file mode 100644
index 6ec70c5..0000000
--- a/00_Exports.zsh
+++ /dev/null
@@ -1,17 +0,0 @@
-export EDITOR="vim"
-export HISTFILE=".zsh/.history.zsh"
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/libs
-eval $(dircolors ~/.dir_colors 2>&-)
-export PATH=$PATH:~/sbin:~/bin
-export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
-#export PRINTER=Gertrude
-export PRINTER=Berthe
-export TIME_STYLE="+%Y-%b-%d %H:%M"
-export TZ="Europe/Paris"
-export PATH=$PATH:~/.pr0n
-source $ZDOTDIR/.keychain
-# Set locales only if they are undefined
-export LC_ALL=${LC_ALL:-fr_FR.UTF-8}
-export LC_MESSAGES=${LC_MESSAGES:-fr_FR}
-export MANPATH=$MANPATH:~/man
-unset LANG # Unuseful
diff --git a/00_Preambule.zsh b/00_Preambule.zsh
new file mode 100644
index 0000000..317dcf0
--- /dev/null
+++ b/00_Preambule.zsh
@@ -0,0 +1,10 @@
+#!/bin/zsh
+## No more core dumps :)
+ulimit -c 0
+umask 002
+
+##
+## sanity
+##
+[[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null
+
diff --git a/01_Exports.VZY08001 b/01_Exports.VZY08001
new file mode 120000
index 0000000..b4ada7f
--- /dev/null
+++ b/01_Exports.VZY08001
@@ -0,0 +1 @@
+01_Exports.Vélizy \ No newline at end of file
diff --git a/01_Exports.paranoid b/01_Exports.paranoid
new file mode 100644
index 0000000..fdb0660
--- /dev/null
+++ b/01_Exports.paranoid
@@ -0,0 +1,3 @@
+#!/bin/zsh
+#export PRINTER=Gertrude
+export PRINTER=Berthe
diff --git a/00_Exports.prunelle b/01_Exports.prunelle
index 2dff2d2..b6096ff 100644
--- a/00_Exports.prunelle
+++ b/01_Exports.prunelle
@@ -1,3 +1,4 @@
+#!/bin/zsh
if ( [ "`uname -s`" = "Darwin" ] )
then
diff --git a/01_Exports.zsh b/01_Exports.zsh
new file mode 100644
index 0000000..5c2c2ac
--- /dev/null
+++ b/01_Exports.zsh
@@ -0,0 +1,62 @@
+#!/bin/zsh
+
+export BC_ENV_ARGS="-q"
+export EDITOR=${EDITOR:-vim}
+export HISTFILE=".zsh/.history.zsh"
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/libs
+eval $(dircolors ~/.dir_colors 2>&-)
+export PATH=$PATH:~/sbin:~/bin
+export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
+export TIME_STYLE="+%Y-%b-%d %H:%M"
+export TZ="Europe/Paris"
+source $ZDOTDIR/.keychain
+# Set locales only if they are undefined
+export LC_ALL=${LC_ALL:-fr_FR.UTF-8}
+export LC_MESSAGES=${LC_MESSAGES:-fr_FR}
+export MANPATH=$MANPATH:~/man
+export NULLCMD=cat
+unset LANG # Unuseful
+
+##
+## basic setup
+##
+LOGCHECK=13
+WATCHFMT=$COLOR_BLUECLAIR"%n"$COLOR_END
+WATCHFMT=$WATCHFMT" has "$COLOR_YELLOW"%a %l from %M"
+WATCH=notme
+WORDCHARS="*?-._[]~=&;!#$%^(){}<>" # I suppressed the '/'
+
+HISTFILE=$ZDOTDIR/.history
+HISTSIZE=42000
+SAVEHIST=42000
+
+##
+## Prompts
+##
+# For more info on PROMPT expansion, see 'man zshmisc'
+##
+
+PS1_ROOT=${PS1_ROOT:-31}
+if ( [ "$SSH_TTY" = "" ] )
+then
+ PS1_USER=${PS1_USER:-34}
+else
+ PS1_USER=${PS1_USER_SSH:-35}
+fi
+
+PS1="%{[%(!."$PS1_ROOT"."$PS1_USER")m%}%n%{[1;%(!."$PS1_ROOT"."$PS1_USER")m%}@%{[0;%(!."$PS1_ROOT"."$PS1_USER")m%}%m%{%} (%{%}%y%{%}) [%(!.%{["$PS1_ROOT"m%}%d%{%}.%{["$PS1_USER"m%}%(5~:.../:)%4~%{%})]"${LD_PRELOAD:t:s/lib//:r}" %h%{[%(!."$PS1_ROOT";1."$PS1_USER")m%}#%{%} "
+
+RPS1="%(?;;%{%}%?%{%}) %{[0;%(!."$PS1_ROOT"."$PS1_USER")m%}%D{%a%d%b|%H:%M'%S}%{%}"
+
+PS2="%{%}%B%_%b%{%}%B>%b%{%} "
+
+SPROMPT="zsh: %{%}%B«%R»%b%{%} ? Ce ne serait pas plutôt %{%}%B«%r»%b%{%} ? [nyae] "
+
+##
+# PS3="?# "
+#
+# PS4="+%N:%i> "
+##
+
+
+#TIMEFMT="\`%J': %U user %S system %*E total (%P cpu)"
diff --git a/01_Aliases.paranoid b/02_Aliases.paranoid
index 1718c15..283316c 100644
--- a/01_Aliases.paranoid
+++ b/02_Aliases.paranoid
@@ -1,3 +1,4 @@
+#!/bin/zsh
## Paranoid specifics aliases
diff --git a/01_Aliases.prunelle b/02_Aliases.prunelle
index b2c0bc2..f809d35 100644
--- a/01_Aliases.prunelle
+++ b/02_Aliases.prunelle
@@ -1,3 +1,4 @@
+#!/bin/zsh
a port='sudo port'
a ls='ls -FG'
a aless='open -a /Applications/DarwinPorts/AquaLess.app'
diff --git a/01_Aliases.zsh b/02_Aliases.zsh
index 1ec93a0..d6b3f74 100644
--- a/01_Aliases.zsh
+++ b/02_Aliases.zsh
@@ -1,7 +1,10 @@
+#!/bin/zsh
alias a='alias'
a una=unalias
+a ...='cd ../..'
+
a e='emacs'
a ne='emacs -nw'
@@ -18,8 +21,10 @@ a rt='find . -type f \( -name "*~" -o -name ".*~" -o -name "#*#" \) -exec rm -vf
a eg=egrep
-a hg='< $HISTFILE egrep'
-a lg='ls -lap | egrep'
+a hg='< $HISTFILE cat -n | grep'
+##'hc' stands for something like 'fc' and 'hg'##
+a hc='history 0| grep'
+a lg='ls -lap | grep'
a s='cd ..'
a so='cd ${OLDPWD}'
diff --git a/02_Options.zsh b/02_Options.zsh
new file mode 100644
index 0000000..e639593
--- /dev/null
+++ b/02_Options.zsh
@@ -0,0 +1,44 @@
+#!/bin/zsh
+
+##
+## Options
+##
+## man zshoptions(1)
+##
+##
+setopt Always_Last_Prompt
+setopt Always_to_End
+setopt Auto_Cd
+setopt Auto_Continue
+setopt Auto_List
+setopt Auto_Menu
+setopt Auto_Param_Keys
+#setopt Auto_Param_Slash
+setopt Auto_PushD
+unsetopt Cd_Able_Vars
+setopt Complete_Aliases
+setopt Complete_in_Word
+#setopt Correct
+setopt Correct_All
+#setopt Equals
+#setopt Extended_Glob
+unsetopt Extended_History
+setopt Hash_Cmds
+setopt Hash_Dirs
+setopt Hist_Expire_Dups_First
+setopt Hist_Ignore_All_Dups
+setopt Hist_Ignore_Space
+setopt Hist_No_Functions
+setopt Hist_No_Store
+setopt Hist_Reduce_Blanks
+setopt Inc_Append_History
+setopt Magic_Equal_Subst
+setopt Mail_Warning
+setopt Mark_Dirs
+unsetopt Menu_Complete
+setopt No_Bg_Nice
+setopt No_Hup
+setopt No_Prompt_Cr
+setopt Numeric_Glob_Sort
+unsetopt Prompt_Cr
+setopt Pushd_Ignore_Dups
diff --git a/02_Zsh.zsh b/02_Zsh.zsh
deleted file mode 100644
index 54f4561..0000000
--- a/02_Zsh.zsh
+++ /dev/null
@@ -1,171 +0,0 @@
-## No more core dumps :)
-ulimit -c 0
-umask 077
-
-export BC_ENV_ARGS="-q"
-
-##chmod 700 ~/tmp
-##find ~ \( -name '#*#' -o -name '.*~' -o -name '*~' \) -exec rm -f {} \;
-
-##
-## exports && aliases
-##
-
-if [ -f ~/.zsh/.exports.zsh ]; then
- source ~/.zsh/.exports.zsh
-fi
-
-if [ -f ~/.zsh/.aliases.zsh ]; then
- source ~/.zsh/.aliases.zsh
-fi
-
-
-##
-## sanity
-##
-[[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null
-
-
-case $SHLVL in
- *2) CLR_SHLVL="%{%}";;
- *3) CLR_SHLVL="%{%}";;
- *4) CLR_SHLVL="%{%}";;
- *5) CLR_SHLVL="%{%}";;
- *6) CLR_SHLVL="%{%}";;
-esac
-
-
-##
-## basic setup
-##
-LOGCHECK=13
-WATCHFMT=$COLOR_BLUECLAIR"%n"$COLOR_END
-WATCHFMT=$WATCHFMT" has "$COLOR_YELLOW"%a %l from %M"
-WATCH=notme
-NULLCMD="less -f"
-WORDCHARS="*?-._[]~=&;!#$%^(){}<>" # I suppressed the '/'
-TIMEFMT="\`%J': %U user %S system %*E total (%P cpu)"
-
-HISTFILE=$ZDOTDIR/.history
-HISTSIZE=42000
-SAVEHIST=42000
-
-##
-## Prompts
-##
-# For more info on PROMPT expansion, see 'man zshmisc'
-##
-
-PS1_ROOT=${PS1_ROOT:-31}
-if ( [ "$SSH_TTY" = "" ] )
-then
- PS1_USER=${PS1_USER:-34}
-else
- PS1_USER=${PS1_USER_SSH:-35}
-fi
-
-PS1="%{[%(!."$PS1_ROOT"."$PS1_USER")m%}%n%{[1;%(!."$PS1_ROOT"."$PS1_USER")m%}@%{[0;%(!."$PS1_ROOT"."$PS1_USER")m%}%m%{%} (%{%}%y%{%}) [%(!.%{["$PS1_ROOT"m%}%d%{%}.%{["$PS1_USER"m%}%(5~:../:)%4~%{%})]"${LD_PRELOAD:t:s/lib//:r}" %h%{[%(!."$PS1_ROOT";1."$PS1_USER")m%}#%{%} "
-
-RPS1="%(?;;%{%}%?%{%}) %{[0;%(!."$PS1_ROOT"."$PS1_USER")m%}%D{%a%d%b|%H:%M'%S}%{%}"
-
-PS2="%{%}%B%_%b%{%}%B>%b%{%} "
-
-SPROMPT="zsh: %{%}%B«%R»%b%{%} ? Ce ne serait pas plutôt %{%}%B«%r»%b%{%} ? [nyae] "
-
-##
-# PS3="?# "
-#
-# PS4="+%N:%i> "
-##
-
-
-##
-## Options
-##
-setopt correct
-#setopt correctall
-setopt inc_append_history
-setopt histignorealldups
-setopt histexpiredupsfirst
-setopt alwayslastprompt
-setopt always_to_end
-setopt auto_cd
-setopt _auto_list
-setopt auto_menu
-setopt auto_param_keys
-#setopt auto_param_slash
-setopt no_bg_nice
-setopt complete_aliases
-setopt hash_cmds
-setopt hash_dirs
-setopt no_hup
-setopt mail_warning
-setopt magic_equal_subst
-setopt numericglobsort
-setopt mark_dirs
-setopt no_prompt_cr
-#setopt equals
-#setopt extended_glob
-unsetopt promptcr
-
-##
-## bindkey
-##
-
-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 "\e\e[C" forward-word # ESC right
-bindkey "\e\e[D" backward-word # ESC left
-bindkey "\e[5~" up-line-or-history # page up # c'est ultime
-bindkey "\e[6~" down-line-or-history # page down
-bindkey "\e\e[3~" kill-region # ESC del
-#aterm
-test $TERM = "rxvt" -o $TERM = "xterm" &&
-{
- 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
-}
-# (gnome-terminal)
-#test $TERM = "xterm" &&
-#{
-# bindkey "\eOH" beginning-of-line # home
-# bindkey "\eOF" end-of-line # end-of-line
-#}
-#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
-
-
-##
-## functions
-##
-##[[ -t 1 ]] &&
-chpwd()
-{
- case $TERM in
- sun-cmd) print -Pn "\e]l%n@%m %~\e\\" ;;
- *xterm*|rxvt|(k|E|dt)term|gnome-terminal) print -Pn "\e]0;%n@%m (%l) %~\a" ;;
- esac
-# print -P "%(/,%78>...>%/,%//)%b"
-}
-
-precmd ()
-{
-# print -nP "%(?,,%{%}Foirage n°%{%}%?\n)%{%}"
-}
-
-##
-## misc commands
-##
-chpwd
-#(/bin/rm -f ~/.saves-*) 2>/dev/null
-
diff --git a/03_Completion.zsh b/03_Completion.zsh
index 7d45035..a3cc525 100644
--- a/03_Completion.zsh
+++ b/03_Completion.zsh
@@ -1,3 +1,4 @@
+#!/bin/zsh
# Fichier de conf pour la personnalisation de la complétion automagique :-)
# Hugues HIEGEL <hugues@nullpart.net>
# jeu mar 3 10:00:44 CET 2005
diff --git a/04_KeyBindings.zsh b/04_KeyBindings.zsh
new file mode 100644
index 0000000..225a2f2
--- /dev/null
+++ b/04_KeyBindings.zsh
@@ -0,0 +1,38 @@
+#!/bin/zsh
+##
+## bindkey
+##
+
+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 "" 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
+
+#aterm
+test $TERM = "rxvt" -o $TERM = "xterm" &&
+{
+ 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
+}
+# (gnome-terminal)
+test $TERM = "xterm" &&
+{
+ bindkey "\eOH" beginning-of-line # home
+ bindkey "\eOF" end-of-line # end-of-line
+}
+#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
+
diff --git a/05_Functions.zsh b/05_Functions.zsh
new file mode 100644
index 0000000..20384aa
--- /dev/null
+++ b/05_Functions.zsh
@@ -0,0 +1,21 @@
+#!/bin/zsh
+
+##[[ -t 1 ]] &&
+chpwd()
+{
+ case $TERM in
+ sun-cmd) print -Pn "\e]l%n@%m %~\e\\" ;;
+ *xterm*|rxvt|(k|E|dt)term|gnome-terminal) print -Pn "\e]0;%n@%m (%l) %~\a" ;;
+ esac
+# print -P "%(/,%78>...>%/,%//)%b"
+}
+
+precmd ()
+{
+# print -nP "%(?,,%{%}Foirage n°%{%}%?\n)%{%}"
+}
+
+preexec ()
+{
+ # nothing :)
+}
diff --git a/99_Debug.zsh b/50_Debug.zsh
index 9c73868..08158de 100644
--- a/99_Debug.zsh
+++ b/50_Debug.zsh
@@ -1,14 +1,17 @@
+#!/bin/zsh
cd_back() {
- for folder in $@
- do
- cd $(echo $folder | sed "s:[^/]\+:..:g")
- done
+# for folder in $@
+# do
+# cd $(echo $folder | sed "s:[^/]\+:..:g")
+# done
+ cd $1 ""
}
ldd()
{
- LDD=$(dlocate ldd | egrep "bin/ldd$" | head -n1 | cut -d' ' -f2)
+ #LDD=$(dlocate ldd | egrep "bin/ldd$" | head -n1 | cut -d' ' -f2)
+ LDD=/usr/bin/ldd
$LDD $@ | sed "s/\(.*local.*\)/\1/;s/\(.*not found.*\)/\1/" | tr -d ' '
}
@@ -38,11 +41,17 @@ exports()
done
}
-precmd()
+preexec()
{
if ( [ "$DEBUG_MODE" = "yes" ] )
then
- exports
fi
}
+precmd()
+{
+ if ( [ "$DEBUG_MODE" = "yes" ] )
+ then
+ exports
+ fi
+}
diff --git a/99_Start.zsh b/99_Start.zsh
new file mode 100644
index 0000000..a0b8cf0
--- /dev/null
+++ b/99_Start.zsh
@@ -0,0 +1,6 @@
+#!/bin/zsh
+
+##
+## misc commands
+##
+chpwd