From 5d6dca3f97bbc6393cc62ca696eec98022de6324 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 1 Apr 2008 16:05:41 +0200 Subject: nouvelle colorization des branches GIT.. --- 01_Functions.zsh | 23 +++++++++++++++++------ 11_Colors.zsh | 3 ++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/01_Functions.zsh b/01_Functions.zsh index 3d1221d..af6423c 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -83,14 +83,25 @@ get_git_branch () # a call to `get_git_branch` get_git_status () { - local my_git_status + local my_git_status cached not_up_to_date managment_folder - if [ "$(git-rev-parse --git-dir)" == "." ] - then - my_git_status="$git_colors[managment_folder]" - elif [ "$(git-diff --cached 2>&- | grep '^diff ')" != "" ] ; then + if [ "$(git-rev-parse --git-dir)" == "." ] ; then + echo "$git_colors[managment_folder]" + return + fi + + if [ "$(git-diff --cached 2>&- | grep '^diff ')" != "" ] ; then + cached="yes" + fi + if [ "$(git-ls-files -m 2>&-)" != "" ] ; then + not_up_to_date="yes" + fi + + if [ "$cached" != "" -a "$not_up_to_date" != "" ] ; then + my_git_status="$git_colors[cached_and_not_up_to_date]" + elif [ "$cached" != "" ] ; then my_git_status="$git_colors[cached]" - elif [ "$(git-ls-files -m 2>&-)" != "" ] ; then + elif [ "$not_up_to_date" != "" ] ; then my_git_status="$git_colors[not_up_to_date]" else my_git_status="$git_colors[up_to_date]" diff --git a/11_Colors.zsh b/11_Colors.zsh index ab455ca..28bd0ec 100644 --- a/11_Colors.zsh +++ b/11_Colors.zsh @@ -76,7 +76,8 @@ set_prompt_colors () git_colors[managment_folder]="$color[red];$color[bold]" # .git/... folder browsing git_colors[cached]="$prompt_colors[to_be_commited]" # git changes in cache - git_colors[not_up_to_date]="$prompt_colors[not_up_to_date]" # git changes in working tree + git_colors[cached_and_not_up_to_date]="$prompt_colors[not_up_to_date];$color[bold]" + git_colors[not_up_to_date]="$prompt_colors[not_up_to_date];$color[normal]" # git changes in working tree git_colors[up_to_date]="$prompt_colors[up_to_date]" # git up-to-date } -- cgit v1.2.3 From 12f3ea32cfd4e8a0fabb168d3929272af88a96f3 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 2 Apr 2008 12:20:13 +0200 Subject: ^L binded to call directly "clear" in order to recalculate the prompt... --- user:hugues/KeyBindings.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user:hugues/KeyBindings.zsh b/user:hugues/KeyBindings.zsh index b9d43f5..34d07d7 100644 --- a/user:hugues/KeyBindings.zsh +++ b/user:hugues/KeyBindings.zsh @@ -225,3 +225,5 @@ bindkey -s 'G' 'Q git-repack\n' bindkey -s 'S' 'Q svn status\n' bindkey -s 'X' 'Q exec zsh\n' + +bindkey -s ' ' 'Q clear\n' -- cgit v1.2.3 From 0c31698701b35f9d9b2ff7d5efd9ae9ce0b217f5 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 2 Apr 2008 14:41:38 +0200 Subject: Debug dans la fonction precmd() --- 12_Prompts.zsh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index a5b7348..c8c0eca 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -56,22 +56,31 @@ old_precmd() { # Error error=$(print -Pn "%(?;;-%?)") + [ "$DEBUG" = "yes" ] && echo -n " Error code..." ERRORSIZE=${#error} ERROR="%(?;;"$C_$prompt_colors[bar]$_C"-"$C_$prompt_colors[error]$_C"%?)" + [ "$DEBUG" = "yes" ] && echo + [ "$DEBUG" = "yes" ] && echo -n " Term title..." # Flush the term title term_title + [ "$DEBUG" = "yes" ] && echo # Date + [ "$DEBUG" = "yes" ] && echo -n " Date..." DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" DATEEXPAND=$(expand_text "$DATE") DATESIZE=${#DATEEXPAND} + [ "$DEBUG" = "yes" ] && echo # Mailcheck + [ "$DEBUG" = "yes" ] && echo -n " Mails..." MAILSTAT=$(eval echo "`[ -s ~/.procmail/procmail.log ] && < ~/.procmail/procmail.log awk 'BEGIN {RS="From" ; HAM=-1 ; LISTES=0 } !/JUNK/ { HAM++ } /Listes|Newsletters|Notifications/ { LISTES++ } END { if ((HAM - LISTES) > 0) { print "$C_$prompt_colors[bar]$_C""-""$C_$mail_colors[unread]$_C""@" } else if (LISTES > 0) { print "$C_$prompt_colors[bar]$_C""-""$C_$mail_colors[listes]$_C""@" } }'`") MAILSTATEXPAND=$(expand_text "$MAILSTAT") MAILSTATSIZE=${#MAILSTATEXPAND} + [ "$DEBUG" = "yes" ] && echo + [ "$DEBUG" = "yes" ] && echo -n " Horizontal bar..." # First line of prompt, calculation of the remaining place spaceleft=$((1 + $COLUMNS - $ERRORSIZE - $MAILSTATSIZE - $DATESIZE)) @@ -80,6 +89,7 @@ old_precmd() do HBAR=$HBAR- done + [ "$DEBUG" = "yes" ] && echo ## ## Second line of prompt : don't let the path garbage the entire line @@ -87,6 +97,7 @@ old_precmd() # get svn status # + [ "$DEBUG" = "yes" ] && echo -n " SVN status..." SVNREV=$(LC_ALL=C svn info 2>&- $PWD | awk '/^Revision: / {print $2}') SVNREVSIZE=${#${SVNREV:+:r$SVNREV}} if [ "$SVNREV" != "" ] @@ -96,16 +107,22 @@ old_precmd() SVNSTATUS=${SVNSTATUS:-$prompt_colors[up_to_date]} fi SVNREV=${SVNREV:+$C_$prompt_colors[doubledot]$_C:$C_$SVNSTATUS$_C"r"$SVNREV} + [ "$DEBUG" = "yes" ] && echo # get git status # + [ "$DEBUG" = "yes" ] && echo -n " GIT status..." GITBRANCH=$(get_git_branch) GITBRANCHSIZE=${#GITBRANCH} [ $GITBRANCHSIZE -gt 0 ] && GITBRANCHSIZE=$(($GITBRANCHSIZE)) + [ "$DEBUG" = "yes" ] && echo + [ "$DEBUG" = "yes" ] && echo -n " Path..." MY_PATH="%(!.%d.%~)" PATHSIZE=$(print -Pn $MY_PATH) PATHSIZE=${#PATHSIZE} + [ "$DEBUG" = "yes" ] && echo + [ "$DEBUG" = "yes" ] && echo -n " Resize path / gitbranch..." spaceleft=`print -Pn "%n@%m $ ls -laCdtrux $(expand_text "$DATE")"` spaceleft=$(($COLUMNS - ${#spaceleft})) #minimalpathsize=`print -Pn "../%1~"` @@ -137,6 +154,7 @@ old_precmd() [ $spaceleft -lt $minimalpathsize ] && spaceleft=$minimalpathsize GITBRANCH=${GITBRANCH:+$C_$prompt_colors[doubledot]$_C:$C_"$(get_git_status)"$_C$GITBRANCH} CURDIR="$C_$prompt_colors[path]$_C%`echo $spaceleft`<..<"$MY_PATH"%<<$C_$color[none]$_C" + [ "$DEBUG" = "yes" ] && echo ## Le prompt le plus magnifique du monde, et c'est le mien ! # Affiche l'user, l'host, le tty et le pwd. Rien que ça... -- cgit v1.2.3 From 18a6223eb7341c13afaaa49b75db3947d797939b Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 4 Apr 2008 10:37:00 +0200 Subject: World-readable new files & folders. That was a shit each time I git-pushed to public repositories.. --- 00_Sanity.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/00_Sanity.zsh b/00_Sanity.zsh index 39ba813..e1d8f76 100644 --- a/00_Sanity.zsh +++ b/00_Sanity.zsh @@ -12,7 +12,7 @@ ulimit -c 0 # No dangerous world-writeable files & folders -umask 067 +umask 066 # sanity [[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null -- cgit v1.2.3 From c4e1b11c76eb68054331d4ec35fdc10b0ea55800 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 8 Apr 2008 11:29:16 +0200 Subject: A bit more useful 'make' keybinding.. --- user:hugues/KeyBindings.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user:hugues/KeyBindings.zsh b/user:hugues/KeyBindings.zsh index 34d07d7..f87c53b 100644 --- a/user:hugues/KeyBindings.zsh +++ b/user:hugues/KeyBindings.zsh @@ -212,7 +212,7 @@ bindkey -s 'é' ' 2>/dev/null ' bindkey -s '2' ' 2>&1 ' bindkey -s 'm' 'Q mails\n' -bindkey -s 'M' 'make ' +bindkey -s 'M' 'Q make\n' bindkey -s 'l' 'Q l\n' #bindkey -s 'L' 'Q la\n' -- cgit v1.2.3 From a2caf7261cd044c7550926963d51301f4bba314e Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 8 Apr 2008 11:29:38 +0200 Subject: umask 066 -> 022.. This is *really* fucking when committing for public git-repositories.. :-/ --- 00_Sanity.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/00_Sanity.zsh b/00_Sanity.zsh index e1d8f76..6dcea64 100644 --- a/00_Sanity.zsh +++ b/00_Sanity.zsh @@ -12,7 +12,7 @@ ulimit -c 0 # No dangerous world-writeable files & folders -umask 066 +umask 022 # sanity [[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null -- cgit v1.2.3 From 57ac3b75d2e6eebd65745640ac0a6ebd0122d8d4 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 28 Feb 2008 18:14:27 +0100 Subject: Pas de gestion de l'option "multibyte" avec zsh@openwide --- 12_Prompts.zsh | 2 +- 20_Options.zsh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index c8c0eca..190b662 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -68,7 +68,7 @@ old_precmd() # Date [ "$DEBUG" = "yes" ] && echo -n " Date..." - DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" + DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%d-%m-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" DATEEXPAND=$(expand_text "$DATE") DATESIZE=${#DATEEXPAND} [ "$DEBUG" = "yes" ] && echo diff --git a/20_Options.zsh b/20_Options.zsh index f694bdf..ca0fb85 100644 --- a/20_Options.zsh +++ b/20_Options.zsh @@ -75,6 +75,3 @@ unsetopt Prompt_Cr setopt Auto_Pushd setopt Pushd_Ignore_Dups setopt Glob - -## Gestion de l'UTF-8 !! -setopt MultiByte -- cgit v1.2.3 From 217af2367f7a0cba677a0bbf2c130d45995b47be Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 6 Mar 2008 11:00:04 +0100 Subject: Affichage de l'@ IP au lieu du nom de la machine (vu qu'il veut rien dire) --- 10_Environment.zsh | 1 + 12_Prompts.zsh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/10_Environment.zsh b/10_Environment.zsh index 52d72f5..ed0312d 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -52,4 +52,5 @@ HISTFILE=$ZDOTDIR/.history.$USER.$HOSTNAME # Pour éviter les conflits de conf HISTSIZE=42000 SAVEHIST=42000 +LOCALIP=$(/sbin/ifconfig| grep adr: | awk '/192.168.3/ { print $2 } ' | cut -d: -f2) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 190b662..971cfef 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -123,7 +123,7 @@ old_precmd() PATHSIZE=${#PATHSIZE} [ "$DEBUG" = "yes" ] && echo [ "$DEBUG" = "yes" ] && echo -n " Resize path / gitbranch..." - spaceleft=`print -Pn "%n@%m $ ls -laCdtrux $(expand_text "$DATE")"` + spaceleft=`print -Pn "%n@$LOCALIP $ ls -laCdtrux $(expand_text "$DATE")"` spaceleft=$(($COLUMNS - ${#spaceleft})) #minimalpathsize=`print -Pn "../%1~"` #minimalpathsize=${#minimalpathsize} @@ -161,7 +161,7 @@ old_precmd() # 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="$MAILSTAT""$ERROR"$C_$prompt_colors[bar]$_C"$HBAR""$DATE -"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"%m $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" " +"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"$LOCALIP $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" " } -- cgit v1.2.3 From 0ace9d72ef42569fce8eda79820657f7cd6a6188 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 7 Mar 2008 16:36:29 +0100 Subject: EDITOR binded to ~/sbin/vim which points to /usr/bin/vim instead of /usr/local/bin/vim --- host:blunderer/user:hugues/Aliases.zsh | 3 +++ host:blunderer/user:hugues/Environment.zsh | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 host:blunderer/user:hugues/Aliases.zsh create mode 100644 host:blunderer/user:hugues/Environment.zsh diff --git a/host:blunderer/user:hugues/Aliases.zsh b/host:blunderer/user:hugues/Aliases.zsh new file mode 100644 index 0000000..a2832cd --- /dev/null +++ b/host:blunderer/user:hugues/Aliases.zsh @@ -0,0 +1,3 @@ + +a vim=$EDITOR + diff --git a/host:blunderer/user:hugues/Environment.zsh b/host:blunderer/user:hugues/Environment.zsh new file mode 100644 index 0000000..7862fa1 --- /dev/null +++ b/host:blunderer/user:hugues/Environment.zsh @@ -0,0 +1,3 @@ +export EDITOR=~/sbin/vim +export VISUAL=$EDITOR +export FCEDIT=$EDITOR -- cgit v1.2.3 From 0b284c1ff45f708fe79c8b9422dd905baf7408e1 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 7 Mar 2008 17:29:14 +0100 Subject: An exec magically proposing a sudo to user openwide when connecting.. --- host:openwide-desktop/Exec.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 host:openwide-desktop/Exec.zsh diff --git a/host:openwide-desktop/Exec.zsh b/host:openwide-desktop/Exec.zsh new file mode 100644 index 0000000..19fe3c3 --- /dev/null +++ b/host:openwide-desktop/Exec.zsh @@ -0,0 +1,6 @@ + +[ "$USER" != openwide ] && ( + echo -n "sudo openwide ? [Y/n] " ; read answer + [ "$answer" != "n" ] && sudo -u openwide -s +) + -- cgit v1.2.3 From bb52c68a2c41e1de7ce7ed94e92a06a74f6f91c3 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 13 Mar 2008 00:53:48 +0100 Subject: Sur le v-lab, j'ai envie de faire gaffe.. --- host:vlab/Environment.zsh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 host:vlab/Environment.zsh diff --git a/host:vlab/Environment.zsh b/host:vlab/Environment.zsh new file mode 100644 index 0000000..0e5fa92 --- /dev/null +++ b/host:vlab/Environment.zsh @@ -0,0 +1,2 @@ +PS1_USER=$color[red] +PS1_USER_SSH=$PS1_USER -- cgit v1.2.3 From a05e60217c355b9f80c341b51a91a19d103f1972 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 13 Mar 2008 10:32:46 +0100 Subject: Prompt colorized in yellow for user openwide@openwide-desktop --- host:openwide-desktop/user:openwide/Environment.zsh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 host:openwide-desktop/user:openwide/Environment.zsh diff --git a/host:openwide-desktop/user:openwide/Environment.zsh b/host:openwide-desktop/user:openwide/Environment.zsh new file mode 100644 index 0000000..efe4ca7 --- /dev/null +++ b/host:openwide-desktop/user:openwide/Environment.zsh @@ -0,0 +1,2 @@ +PS1_USER=$color[yellow] +PS1_USER_SSH=$PS1_USER -- cgit v1.2.3 From ef2d37bae531f6dec57c669223f3ce290f3a4ac6 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 26 Mar 2008 14:31:30 +0100 Subject: blunderer renamed to patate ! --- host:blunderer/user:hugues/Aliases.zsh | 3 --- host:blunderer/user:hugues/Environment.zsh | 3 --- host:patate/user:hugues/Aliases.zsh | 3 +++ host:patate/user:hugues/Environment.zsh | 3 +++ 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 host:blunderer/user:hugues/Aliases.zsh delete mode 100644 host:blunderer/user:hugues/Environment.zsh create mode 100644 host:patate/user:hugues/Aliases.zsh create mode 100644 host:patate/user:hugues/Environment.zsh diff --git a/host:blunderer/user:hugues/Aliases.zsh b/host:blunderer/user:hugues/Aliases.zsh deleted file mode 100644 index a2832cd..0000000 --- a/host:blunderer/user:hugues/Aliases.zsh +++ /dev/null @@ -1,3 +0,0 @@ - -a vim=$EDITOR - diff --git a/host:blunderer/user:hugues/Environment.zsh b/host:blunderer/user:hugues/Environment.zsh deleted file mode 100644 index 7862fa1..0000000 --- a/host:blunderer/user:hugues/Environment.zsh +++ /dev/null @@ -1,3 +0,0 @@ -export EDITOR=~/sbin/vim -export VISUAL=$EDITOR -export FCEDIT=$EDITOR diff --git a/host:patate/user:hugues/Aliases.zsh b/host:patate/user:hugues/Aliases.zsh new file mode 100644 index 0000000..a2832cd --- /dev/null +++ b/host:patate/user:hugues/Aliases.zsh @@ -0,0 +1,3 @@ + +a vim=$EDITOR + diff --git a/host:patate/user:hugues/Environment.zsh b/host:patate/user:hugues/Environment.zsh new file mode 100644 index 0000000..7862fa1 --- /dev/null +++ b/host:patate/user:hugues/Environment.zsh @@ -0,0 +1,3 @@ +export EDITOR=~/sbin/vim +export VISUAL=$EDITOR +export FCEDIT=$EDITOR -- cgit v1.2.3 From ca9828217c714b4d09f4a456d3b7f48d29d5b75c Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 1 Apr 2008 16:31:20 +0200 Subject: Don't use anymore the user "openwide" on this fucking dev machine since lgm-snaf1 is compilable without this fucking ~openwide/workspace-snaf1 symlink !! --- host:openwide-desktop/Environment.zsh | 2 ++ host:openwide-desktop/Exec.zsh | 6 ------ host:openwide-desktop/user:openwide/Environment.zsh | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 host:openwide-desktop/Environment.zsh delete mode 100644 host:openwide-desktop/Exec.zsh delete mode 100644 host:openwide-desktop/user:openwide/Environment.zsh diff --git a/host:openwide-desktop/Environment.zsh b/host:openwide-desktop/Environment.zsh new file mode 100644 index 0000000..efe4ca7 --- /dev/null +++ b/host:openwide-desktop/Environment.zsh @@ -0,0 +1,2 @@ +PS1_USER=$color[yellow] +PS1_USER_SSH=$PS1_USER diff --git a/host:openwide-desktop/Exec.zsh b/host:openwide-desktop/Exec.zsh deleted file mode 100644 index 19fe3c3..0000000 --- a/host:openwide-desktop/Exec.zsh +++ /dev/null @@ -1,6 +0,0 @@ - -[ "$USER" != openwide ] && ( - echo -n "sudo openwide ? [Y/n] " ; read answer - [ "$answer" != "n" ] && sudo -u openwide -s -) - diff --git a/host:openwide-desktop/user:openwide/Environment.zsh b/host:openwide-desktop/user:openwide/Environment.zsh deleted file mode 100644 index efe4ca7..0000000 --- a/host:openwide-desktop/user:openwide/Environment.zsh +++ /dev/null @@ -1,2 +0,0 @@ -PS1_USER=$color[yellow] -PS1_USER_SSH=$PS1_USER -- cgit v1.2.3 From 791ee1ab936a34a348366bba8cbe232dc849f7a2 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 7 Apr 2008 15:38:44 +0200 Subject: Source dash.conf on openwide-desktop. --- host:openwide-desktop/Environment.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host:openwide-desktop/Environment.zsh b/host:openwide-desktop/Environment.zsh index efe4ca7..2dfa543 100644 --- a/host:openwide-desktop/Environment.zsh +++ b/host:openwide-desktop/Environment.zsh @@ -1,2 +1,4 @@ PS1_USER=$color[yellow] PS1_USER_SSH=$PS1_USER + +source /etc/dash.conf -- cgit v1.2.3 From a391c258df37309765cdaab674c8b62954647286 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 9 Apr 2008 15:40:15 +0200 Subject: Merge 'ow' dans 'master' / Reverts OpenWide-specifics config Revert "Pas de gestion de l'option 'multibyte' avec zsh@openwide" commit 57ac3b75d2e6eebd65745640ac0a6ebd0122d8d4. Revert "Affichage de l'@ IP au lieu du nom de la machine (vu qu'il veut rien dire)" commit 217af2367f7a0cba677a0bbf2c130d45995b47be. --- 10_Environment.zsh | 1 - 12_Prompts.zsh | 6 +++--- 20_Options.zsh | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/10_Environment.zsh b/10_Environment.zsh index ed0312d..52d72f5 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -52,5 +52,4 @@ HISTFILE=$ZDOTDIR/.history.$USER.$HOSTNAME # Pour éviter les conflits de conf HISTSIZE=42000 SAVEHIST=42000 -LOCALIP=$(/sbin/ifconfig| grep adr: | awk '/192.168.3/ { print $2 } ' | cut -d: -f2) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 971cfef..c8c0eca 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -68,7 +68,7 @@ old_precmd() # Date [ "$DEBUG" = "yes" ] && echo -n " Date..." - DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%d-%m-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" + DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" DATEEXPAND=$(expand_text "$DATE") DATESIZE=${#DATEEXPAND} [ "$DEBUG" = "yes" ] && echo @@ -123,7 +123,7 @@ old_precmd() PATHSIZE=${#PATHSIZE} [ "$DEBUG" = "yes" ] && echo [ "$DEBUG" = "yes" ] && echo -n " Resize path / gitbranch..." - spaceleft=`print -Pn "%n@$LOCALIP $ ls -laCdtrux $(expand_text "$DATE")"` + spaceleft=`print -Pn "%n@%m $ ls -laCdtrux $(expand_text "$DATE")"` spaceleft=$(($COLUMNS - ${#spaceleft})) #minimalpathsize=`print -Pn "../%1~"` #minimalpathsize=${#minimalpathsize} @@ -161,7 +161,7 @@ old_precmd() # 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="$MAILSTAT""$ERROR"$C_$prompt_colors[bar]$_C"$HBAR""$DATE -"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"$LOCALIP $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" " +"$C_$prompt_colors[user]$_C"%n"$C_$prompt_colors[arob]$_C"@"$C_$prompt_colors[host]$_C"%m $CURDIR$SVNREV$GITBRANCH "$C_$prompt_colors[dies]$_C"%#"$C_$prompt_colors[cmd]$_C" " } diff --git a/20_Options.zsh b/20_Options.zsh index ca0fb85..f694bdf 100644 --- a/20_Options.zsh +++ b/20_Options.zsh @@ -75,3 +75,6 @@ unsetopt Prompt_Cr setopt Auto_Pushd setopt Pushd_Ignore_Dups setopt Glob + +## Gestion de l'UTF-8 !! +setopt MultiByte -- cgit v1.2.3 From a7ab0284ca57ccdc723afb3739380f48be60338c Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 22 May 2008 17:05:37 +0200 Subject: Sweethome ! --- net:ordener.fr | 1 + net:ordener.fr/Aliases.zsh | 17 --------------- net:ordener.fr/Environment.zsh | 13 ----------- net:ordener.fr/Hashes.zsh | 3 --- net:ordener.fr/host:delphine/Hashes.zsh | 1 - net:ordener.fr/host:prunelle/Aliases.zsh | 13 ----------- net:ordener.fr/host:prunelle/Environment.zsh | 32 ---------------------------- net:ordener.fr/host:prunelle/README | 2 -- net:sweethome/Aliases.zsh | 17 +++++++++++++++ net:sweethome/Environment.zsh | 13 +++++++++++ net:sweethome/Hashes.zsh | 3 +++ net:sweethome/host:delphine/Hashes.zsh | 1 + net:sweethome/host:prunelle/Aliases.zsh | 13 +++++++++++ net:sweethome/host:prunelle/Environment.zsh | 32 ++++++++++++++++++++++++++++ net:sweethome/host:prunelle/README | 2 ++ 15 files changed, 82 insertions(+), 81 deletions(-) create mode 120000 net:ordener.fr delete mode 100644 net:ordener.fr/Aliases.zsh delete mode 100644 net:ordener.fr/Environment.zsh delete mode 100644 net:ordener.fr/Hashes.zsh delete mode 100644 net:ordener.fr/host:delphine/Hashes.zsh delete mode 100644 net:ordener.fr/host:prunelle/Aliases.zsh delete mode 100644 net:ordener.fr/host:prunelle/Environment.zsh delete mode 100644 net:ordener.fr/host:prunelle/README create mode 100644 net:sweethome/Aliases.zsh create mode 100644 net:sweethome/Environment.zsh create mode 100644 net:sweethome/Hashes.zsh create mode 100644 net:sweethome/host:delphine/Hashes.zsh create mode 100644 net:sweethome/host:prunelle/Aliases.zsh create mode 100644 net:sweethome/host:prunelle/Environment.zsh create mode 100644 net:sweethome/host:prunelle/README diff --git a/net:ordener.fr b/net:ordener.fr new file mode 120000 index 0000000..dae2782 --- /dev/null +++ b/net:ordener.fr @@ -0,0 +1 @@ +net:sweethome \ No newline at end of file diff --git a/net:ordener.fr/Aliases.zsh b/net:ordener.fr/Aliases.zsh deleted file mode 100644 index b82b99c..0000000 --- a/net:ordener.fr/Aliases.zsh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/zsh -## -## Part of configuration files for Zsh 4 -## by Hugues Hiegel -## -## 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 - -#cmd_exists mailstat && a maillogs='mailstat -mo ~/.procmail/procmail.log | cut -c8- | sed "s:^[0-9]*::"' -#cmd_exists mailstat && a mailstats='echo ; echo "\tToday" ; awk < ~/.procmail/procmail.log{,.old} "BEGIN {RS=\"From\"} /`LC_ALL=C date "+%a %b %d ..:..:.. %Y"`/ { print \"From \"\$0 }" | grep -v "^$" | mailstat | cut -c8- | sed "s:^[0-9]*::"' -#cmd_exists mailstat && a mails='mailstat -km ~/.procmail/procmail.log | sed "s/^No mail.*/ No mail/" | cut -c8- | sed "s:^[0-9]*::" | egrep -v "## .*:" ; cat ~/.procmail/procmail.log >> ~/.procmail/procmail.log.old ; :> ~/.procmail/procmail.log' -cmd_exists mutt && a junkmail='[ -f ~/Mail/junk.gz ] && mutt -f ~/Mail/junk.gz' diff --git a/net:ordener.fr/Environment.zsh b/net:ordener.fr/Environment.zsh deleted file mode 100644 index ed3734a..0000000 --- a/net:ordener.fr/Environment.zsh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/zsh -## -## Part of configuration files for Zsh 4 -## by Hugues Hiegel -## -## 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=Gertrude -export NNTPSERVER=news.free.fr diff --git a/net:ordener.fr/Hashes.zsh b/net:ordener.fr/Hashes.zsh deleted file mode 100644 index 415e0c6..0000000 --- a/net:ordener.fr/Hashes.zsh +++ /dev/null @@ -1,3 +0,0 @@ - -hash -d foutoir=/goinfre/Foutoir - diff --git a/net:ordener.fr/host:delphine/Hashes.zsh b/net:ordener.fr/host:delphine/Hashes.zsh deleted file mode 100644 index da06ce8..0000000 --- a/net:ordener.fr/host:delphine/Hashes.zsh +++ /dev/null @@ -1 +0,0 @@ -hash -d old=/homes/hugues diff --git a/net:ordener.fr/host:prunelle/Aliases.zsh b/net:ordener.fr/host:prunelle/Aliases.zsh deleted file mode 100644 index 03b6b3f..0000000 --- a/net:ordener.fr/host:prunelle/Aliases.zsh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/zsh -## -## Part of configuration files for Zsh 4 -## by Hugues Hiegel -## -## 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/net:ordener.fr/host:prunelle/Environment.zsh b/net:ordener.fr/host:prunelle/Environment.zsh deleted file mode 100644 index 219e88e..0000000 --- a/net:ordener.fr/host:prunelle/Environment.zsh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/zsh -## -## Part of configuration files for Zsh 4 -## by Hugues Hiegel -## -## 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 - export DISPLAY=:0 - - ## Fink / DarwinPorts - - MANPATH=/usr/share/man - INFOPATH=/usr/share/info - - for i in usr/X11R6 dp sw ; do - export PATH=$PATH:/$i/bin:/$i/sbin - export MANPATH=$MANPATH:/$i/share/man - export INFOPATH=$INFOPATH:/$i/share/info - done - - typeset -gU PATH MANPATH INFOPATH -fi - -PS1_USER="1" -PS1_USER_SSH="$PS1_USER" -PS1_ROOT="31;1" diff --git a/net:ordener.fr/host:prunelle/README b/net:ordener.fr/host:prunelle/README deleted file mode 100644 index 33e3fd8..0000000 --- a/net:ordener.fr/host:prunelle/README +++ /dev/null @@ -1,2 +0,0 @@ -C'est l'iBook d'Hugues :) -Sous Darwin, soit dit en passant... diff --git a/net:sweethome/Aliases.zsh b/net:sweethome/Aliases.zsh new file mode 100644 index 0000000..b82b99c --- /dev/null +++ b/net:sweethome/Aliases.zsh @@ -0,0 +1,17 @@ +#!/bin/zsh +## +## Part of configuration files for Zsh 4 +## by Hugues Hiegel +## +## 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 + +#cmd_exists mailstat && a maillogs='mailstat -mo ~/.procmail/procmail.log | cut -c8- | sed "s:^[0-9]*::"' +#cmd_exists mailstat && a mailstats='echo ; echo "\tToday" ; awk < ~/.procmail/procmail.log{,.old} "BEGIN {RS=\"From\"} /`LC_ALL=C date "+%a %b %d ..:..:.. %Y"`/ { print \"From \"\$0 }" | grep -v "^$" | mailstat | cut -c8- | sed "s:^[0-9]*::"' +#cmd_exists mailstat && a mails='mailstat -km ~/.procmail/procmail.log | sed "s/^No mail.*/ No mail/" | cut -c8- | sed "s:^[0-9]*::" | egrep -v "## .*:" ; cat ~/.procmail/procmail.log >> ~/.procmail/procmail.log.old ; :> ~/.procmail/procmail.log' +cmd_exists mutt && a junkmail='[ -f ~/Mail/junk.gz ] && mutt -f ~/Mail/junk.gz' diff --git a/net:sweethome/Environment.zsh b/net:sweethome/Environment.zsh new file mode 100644 index 0000000..ed3734a --- /dev/null +++ b/net:sweethome/Environment.zsh @@ -0,0 +1,13 @@ +#!/bin/zsh +## +## Part of configuration files for Zsh 4 +## by Hugues Hiegel +## +## 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=Gertrude +export NNTPSERVER=news.free.fr diff --git a/net:sweethome/Hashes.zsh b/net:sweethome/Hashes.zsh new file mode 100644 index 0000000..415e0c6 --- /dev/null +++ b/net:sweethome/Hashes.zsh @@ -0,0 +1,3 @@ + +hash -d foutoir=/goinfre/Foutoir + diff --git a/net:sweethome/host:delphine/Hashes.zsh b/net:sweethome/host:delphine/Hashes.zsh new file mode 100644 index 0000000..da06ce8 --- /dev/null +++ b/net:sweethome/host:delphine/Hashes.zsh @@ -0,0 +1 @@ +hash -d old=/homes/hugues diff --git a/net:sweethome/host:prunelle/Aliases.zsh b/net:sweethome/host:prunelle/Aliases.zsh new file mode 100644 index 0000000..03b6b3f --- /dev/null +++ b/net:sweethome/host:prunelle/Aliases.zsh @@ -0,0 +1,13 @@ +#!/bin/zsh +## +## Part of configuration files for Zsh 4 +## by Hugues Hiegel +## +## 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/net:sweethome/host:prunelle/Environment.zsh b/net:sweethome/host:prunelle/Environment.zsh new file mode 100644 index 0000000..219e88e --- /dev/null +++ b/net:sweethome/host:prunelle/Environment.zsh @@ -0,0 +1,32 @@ +#!/bin/zsh +## +## Part of configuration files for Zsh 4 +## by Hugues Hiegel +## +## 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 + export DISPLAY=:0 + + ## Fink / DarwinPorts + + MANPATH=/usr/share/man + INFOPATH=/usr/share/info + + for i in usr/X11R6 dp sw ; do + export PATH=$PATH:/$i/bin:/$i/sbin + export MANPATH=$MANPATH:/$i/share/man + export INFOPATH=$INFOPATH:/$i/share/info + done + + typeset -gU PATH MANPATH INFOPATH +fi + +PS1_USER="1" +PS1_USER_SSH="$PS1_USER" +PS1_ROOT="31;1" diff --git a/net:sweethome/host:prunelle/README b/net:sweethome/host:prunelle/README new file mode 100644 index 0000000..33e3fd8 --- /dev/null +++ b/net:sweethome/host:prunelle/README @@ -0,0 +1,2 @@ +C'est l'iBook d'Hugues :) +Sous Darwin, soit dit en passant... -- cgit v1.2.3 From c0850c6ae59422afc306856c14da6de5d89680f7 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 22 May 2008 17:05:52 +0200 Subject: Color definition for 'grep' (How didn't I noticed this error sooner ??) --- user:hugues/Environment.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user:hugues/Environment.zsh b/user:hugues/Environment.zsh index a0feccd..8e9c596 100644 --- a/user:hugues/Environment.zsh +++ b/user:hugues/Environment.zsh @@ -33,7 +33,7 @@ export LC_MESSAGES=${LC_MESSAGES:-fr_FR} unset LANG # Unuseful # Couleurs pour grep --color=auto -export GREP_COLOR=$YELLOW\;$BOLD +export GREP_COLOR=$color[yellow]\;$color[bold] cmd_exists dircolors && eval $(dircolors ~/.dir_colors) export TZ="Europe/Paris" -- cgit v1.2.3 From bb76357c72d67b5eab803fccce27617d178f7ed3 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 22 May 2008 17:06:44 +0200 Subject: Personnalized non-UTF8 title for PuTTY terms. Don't forget to set "TERM" to "putty" when needed... --- 01_Functions.zsh | 2 +- 12_Prompts.zsh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/01_Functions.zsh b/01_Functions.zsh index af6423c..d4c77bf 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -29,7 +29,7 @@ term_title() sun-cmd) print -Pn "\e]l%n@%m %~$1\e\\" # Never tested.. ;; - *term*|rxvt*) + *term*|rxvt*|putty) print -Pn "\e]0;%n@%m (%l) %~$1\a" # Sets term title ;; screen) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index c8c0eca..b6cf511 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -24,7 +24,8 @@ set_prompt_colors $prompt_colors[generic] preexec () { - term_title " ··· $(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g')" + local my_sep=$([ "$TERM" = "putty" ] && echo "---" || echo "···") + term_title " $my_sep $(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g')" print -Pn "$C_$prompt_colors[exec]$_C" } -- cgit v1.2.3