From 752e1697e3111cf61fbd964020f651c6571d9e1b Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 20 Jul 2012 11:59:17 +0200 Subject: LA FLEMME .... --- 01_Internal.zsh | 2 +- 12_Prompts.zsh | 9 ++++++++- net:foret/Environment.zsh | 2 +- net:foret/Hashes.zsh | 4 ++++ net:foret/Prompts.zsh | 3 ++- net:foret/completion/_sdk-targets | 10 ++++++---- user:hugues/Hashes.zsh | 4 ---- user:hugues/KeyBindings.zsh | 2 +- user:hugues/net:foret/KeyBindings.zsh | 4 ++-- zshrc | 1 - 10 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 net:foret/Hashes.zsh delete mode 100644 user:hugues/Hashes.zsh diff --git a/01_Internal.zsh b/01_Internal.zsh index b99213a..21d109d 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -216,7 +216,7 @@ __get_git_branch () if [ "$(git rev-parse --is-inside-git-dir)" != "true" -a "$(git config --get core.bare)" != "true" ] then local _stashed=$(git stash list | wc -l ) - [ "$_stashed" -gt 0 ] && my_git_branch+=$C_$_prompt_colors[bold_generic]$_C + [ "$_stashed" -gt 0 ] && my_git_branch+=$C_$_prompt_colors[soft_generic]$_C [ "$_stashed" -gt 0 ] && for i in {1..$_stashed} do my_git_branch+="ยท" diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 4a8b1b6..548ab46 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -283,6 +283,13 @@ __show_date() echo $(tput cub $COLUMNS ; tput cuf $(($COLUMNS - $DATESIZE)))$DATE } +__display () +{ + __debug -n " Display..." + echo ${DISPLAY:+$C_$_prompt_colors[display]$_C"("$DISPLAY")"} + __debug +} +PS1_TASKBAR+=(__display) __display_vi_mode() { @@ -305,7 +312,7 @@ __two_lines_prompt () PS1_+=$(__show_date) PS1_+=" -"$C_$prompt_color[default]$_C$C_$_prompt_colors[user]$_C"%n"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%M"$C_$_prompt_colors[display]$_C"${DISPLAY:+($DISPLAY)} "$CURDIR${VCSBRANCH:+ $VCSBRANCH} +"$C_$prompt_color[default]$_C$C_$_prompt_colors[user]$_C"%n"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%M "$CURDIR${VCSBRANCH:+ $VCSBRANCH} for trigger in $PS1_EXTRA_INFO do result=$($trigger) diff --git a/net:foret/Environment.zsh b/net:foret/Environment.zsh index 9066a83..809afbb 100644 --- a/net:foret/Environment.zsh +++ b/net:foret/Environment.zsh @@ -1,5 +1,5 @@ -export MUSICPLAYER=totem +export MUSICPLAYER=musicplayer # ccache export CCACHE_DIR=/work/$USER/.ccache diff --git a/net:foret/Hashes.zsh b/net:foret/Hashes.zsh new file mode 100644 index 0000000..a6b64c6 --- /dev/null +++ b/net:foret/Hashes.zsh @@ -0,0 +1,4 @@ + +#hash -d work=/work/$USER +hash -d share=/share/public/hugues + diff --git a/net:foret/Prompts.zsh b/net:foret/Prompts.zsh index c920cf8..7ba972a 100644 --- a/net:foret/Prompts.zsh +++ b/net:foret/Prompts.zsh @@ -62,9 +62,10 @@ __nproc_compilation () NPROC=${NPROC:-0} [ $(($NPROC)) -gt 0 ] || { unset NPROC ; return } - echo -n $C_ + echo -n $C_$_prompt_colors[bar]$_C$T_"u"$_T$C_ export | grep -q '^NPROC=' && echo -n "1;" echo -n $_make_colors[nproc]$_C$(for i in {1..$NPROC} ; echo -n -n "|") + echo -n $C_$_prompt_colors[bar]$_C$T_"t"$_T } __makeflags () { diff --git a/net:foret/completion/_sdk-targets b/net:foret/completion/_sdk-targets index 4f9fe87..10ed54c 100644 --- a/net:foret/completion/_sdk-targets +++ b/net:foret/completion/_sdk-targets @@ -33,18 +33,20 @@ _sdk-targets() { case "$service" in sdk-factory.sh) _arguments \ - '(-s)'{-a,--enable-all-protocols}'[Enable all protocols]'\ + {-a,--enable-all-protocols}'[Enable all protocols]'\ {-c+,--config=}'[Selects config FILE to use]:file:_files'\ {-d,--debug-make}'[Add debugging verbosity to make]'\ - '(-p)'{-f,--framework-only}'[Generates only the framework libraries]'\ - '(-f)'{-p,--protocols-only}'[Generates only the protocols bundle libraries]'\ {-g,--enable-debug-info}'[Enable debug info in binaries]'\ {-h,--enable-host}'[Enable host binaries building]'\ {-i,--disable-security}'[Disable licence checking]'\ {-n,--nomake}'[No make done]'\ {-s,--enable-specific-protocols}'[Enable specific protocols]'\ {-v,--verbose}'[Enable verbose compilation]'\ - ':current target:(( $(_current_target) ))' + ':current target:(( $(_current_target) ))' \ + - framework \ + {-f,--framework-only}'[Generates only the framework libraries]'\ + - protobundle \ + {-p,--protocols-only}'[Generates only the protocols bundle libraries]' _alternative ':other targets:(( $( _other_targets ) ))' ;; set-target-build-env.sh) diff --git a/user:hugues/Hashes.zsh b/user:hugues/Hashes.zsh deleted file mode 100644 index 8f564ca..0000000 --- a/user:hugues/Hashes.zsh +++ /dev/null @@ -1,4 +0,0 @@ - -hash -d work=/work/$USER -hash -d share=/share/public/hugues - diff --git a/user:hugues/KeyBindings.zsh b/user:hugues/KeyBindings.zsh index 5419e5b..549e9c4 100644 --- a/user:hugues/KeyBindings.zsh +++ b/user:hugues/KeyBindings.zsh @@ -237,7 +237,7 @@ do bindkey -M $keymap '^[q' push-input bindkey -M $keymap '^[Q' push-input - bindkey -M $keymap -s '^[R' '^[Q up_up ; __redefine_prompt\n^[xreset-prompt\n' + bindkey -M $keymap -s '^[R' '^[Q up_up ; sc blue ; __redefine_prompt\n^[xreset-prompt\n' bindkey -M $keymap -s '^[B' '^[Q __clear $(tput lines)\n' done diff --git a/user:hugues/net:foret/KeyBindings.zsh b/user:hugues/net:foret/KeyBindings.zsh index 626ca3f..13d0538 100644 --- a/user:hugues/net:foret/KeyBindings.zsh +++ b/user:hugues/net:foret/KeyBindings.zsh @@ -21,7 +21,7 @@ __nproc () for keymap in viins vicmd emacs do - bindkey -M $keymap -s '+' 'Q __up_up ; __nproc + 1\n' - bindkey -M $keymap -s '-' 'Q __up_up ; __nproc - 1\n' + bindkey -M $keymap -s '+' 'Q up_up ; __nproc + 1\n' + bindkey -M $keymap -s '-' 'Q up_up ; __nproc - 1\n' done diff --git a/zshrc b/zshrc index 5061236..056f884 100644 --- a/zshrc +++ b/zshrc @@ -44,7 +44,6 @@ KEYCHAIN=~/.keychain/$(hostname)-sh [ -r "${KEYCHAIN}" ] && source ${KEYCHAIN} [ -r "${KEYCHAIN}-gpg" ] && source ${KEYCHAIN}-gpg - __debug () { [ -n "$DEBUG" ] && echo >&2 $@ -- cgit v1.2.3