From 08137c52c71d8d78d713a420fc27b0f63f699a07 Mon Sep 17 00:00:00 2001 From: Foo Date: Thu, 14 Jul 2016 01:04:26 +0300 Subject: [PATCH 01/18] Update documentation regarding IPython --- docs/source/usage/other.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/usage/other.rst b/docs/source/usage/other.rst index 72bff6d12..1215dd916 100644 --- a/docs/source/usage/other.rst +++ b/docs/source/usage/other.rst @@ -124,6 +124,22 @@ For IPython>=0.11 add the following line to 'powerline.bindings.ipython.post_0_11' ] +For IPython>=5.0 you may use the above set up, but it is deprecated. It is +suggested to use + +.. code-block:: Python + + from powerline.bindings.ipython.since_5 import PowerlinePrompts + c = get_config() + c.TerminalInteractiveShell.simple_prompt = False + c.TerminalInteractiveShell.prompts_class = PowerlinePrompts + +.. note:: + Setting ``simple_prompt`` to False after IPython-5.0 is required regardless + of whether you use ``c.InteractiveShellApp.extensions`` setting or + ``c.TerminalInteractiveShell.prompts_class``. But you probably already have + this line because IPython is not very useful without it. + IPython=0.11* is not supported and does not work. IPython<0.10 was not tested (not installable by pip). From dd58d5f4cd01ec00efea27514d2b5f05f2de5043 Mon Sep 17 00:00:00 2001 From: Foo Date: Thu, 14 Jul 2016 01:05:00 +0300 Subject: [PATCH 02/18] =?UTF-8?q?Fix=20underline=20of=20=E2=80=9Ci3wm=20li?= =?UTF-8?q?sters=E2=80=9D=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/source/configuration/listers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/configuration/listers.rst b/docs/source/configuration/listers.rst index e6ba06e75..7aaaabc22 100644 --- a/docs/source/configuration/listers.rst +++ b/docs/source/configuration/listers.rst @@ -29,7 +29,7 @@ Pdb listers :members: i3wm listers ----------- +------------ .. automodule:: powerline.listers.i3wm :members: From ead3ff33f3b2984f16892e1fff0c494209b51b01 Mon Sep 17 00:00:00 2001 From: Foo Date: Thu, 14 Jul 2016 01:25:10 +0300 Subject: [PATCH 03/18] Add warning regarding segments that use cwd to tmux usage docs --- docs/source/configuration/reference.rst | 2 ++ docs/source/usage/other.rst | 23 +++++++++++++++++++++++ docs/source/usage/shell-prompts.rst | 2 ++ 3 files changed, 27 insertions(+) diff --git a/docs/source/configuration/reference.rst b/docs/source/configuration/reference.rst index 99b32be1b..c93cc0cec 100644 --- a/docs/source/configuration/reference.rst +++ b/docs/source/configuration/reference.rst @@ -191,6 +191,8 @@ Common configuration is a subdictionary that is a value of ``ext`` key in ``{output : theme_name}`` that maps the ``xrandr`` output names to the local themes to use on that output. +.. _config-ext-components: + ``components`` Determines which extension components should be enabled. This key is highly extension-specific, here is the table of extensions and corresponding diff --git a/docs/source/usage/other.rst b/docs/source/usage/other.rst index 1215dd916..18d25d997 100644 --- a/docs/source/usage/other.rst +++ b/docs/source/usage/other.rst @@ -100,6 +100,29 @@ root `):: to :file:`.tmux.conf`. +.. warning:: + Segments which depend on current working directory (e.g. + :py:func:`powerline.segments.common.vcs.branch`) require also setting up + :ref:`shell bindings `. It is not required to use powerline + shell prompt, :ref:`components setting ` allows to + set up only powerline bindings for tmux without altering your prompt. + Without setting up shell bindings powerline will use current working + directory of *tmux server* which is probably not what you need. + + Segments which depend on environment like + :py:func:`powerline.segments.common.env.virtualenv` will not work at all + (i.e. they will use environment of the tmux server), tracking environment + changes is going to slow down shell a lot. + + In any case it is suggested to avoid both kinds of segments in tmux + :ref:`themes ` because even support for tracking current + directory is very limited: + + #. It works only in shell. Should you e.g. run Vim and run ``:cd`` there you + will get current working directory from shell. + #. It works only in local shell and requires configuring it. + #. Some shells are not supported at all. + IPython prompt ============== diff --git a/docs/source/usage/shell-prompts.rst b/docs/source/usage/shell-prompts.rst index 2ad853652..0a5c1f384 100644 --- a/docs/source/usage/shell-prompts.rst +++ b/docs/source/usage/shell-prompts.rst @@ -1,3 +1,5 @@ +.. _usage-shell: + ************* Shell prompts ************* From 70246c38e7f4d6e63b01e4c437483e7653b976f9 Mon Sep 17 00:00:00 2001 From: Foo Date: Wed, 17 Aug 2016 22:27:37 +0300 Subject: [PATCH 04/18] Use $TMUX_PANE if it is defined Also closes #1637 in most cases --- powerline/bindings/bash/powerline.sh | 7 ++++++- powerline/bindings/fish/powerline-setup.fish | 12 ++++++++++-- powerline/bindings/rc/powerline.rc | 10 +++++++++- powerline/bindings/shell/powerline.sh | 7 ++++++- powerline/bindings/tcsh/powerline.tcsh | 12 +++++++++++- powerline/bindings/zsh/powerline.zsh | 7 ++++++- 6 files changed, 48 insertions(+), 7 deletions(-) diff --git a/powerline/bindings/bash/powerline.sh b/powerline/bindings/bash/powerline.sh index 8f69546f4..75f8e08d3 100644 --- a/powerline/bindings/bash/powerline.sh +++ b/powerline/bindings/bash/powerline.sh @@ -10,8 +10,13 @@ _powerline_columns_fallback() { return 0 } +_powerline_tmux_pane() { + echo "${TMUX_PANE:-`TMUX="$_POWERLINE_TMUX" tmux display -p "#D"`}" | \ + tr -d ' %' +} + _powerline_tmux_setenv() { - TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_"$1"_`tmux display -p "#D" | tr -d %` "$2" + TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_"$1"_`_powerline_tmux_pane` "$2" TMUX="$_POWERLINE_TMUX" tmux refresh -S } diff --git a/powerline/bindings/fish/powerline-setup.fish b/powerline/bindings/fish/powerline-setup.fish index 4c80cae7a..f9539e7b1 100644 --- a/powerline/bindings/fish/powerline-setup.fish +++ b/powerline/bindings/fish/powerline-setup.fish @@ -82,9 +82,17 @@ function powerline-setup if env $POWERLINE_CONFIG_COMMAND shell --shell=fish uses tmux if test -n "$TMUX" if tmux refresh -S ^/dev/null + set -g _POWERLINE_TMUX "$TMUX" + function _powerline_tmux_pane + if test -z "$TMUX_PANE" + env TMUX="$_POWERLINE_TMUX" tmux display -p "#D" | tr -d ' %' + else + echo "$TMUX_PANE" | tr -d ' %' + end + end function _powerline_tmux_setenv - tmux setenv -g TMUX_$argv[1]_(tmux display -p "#D" | tr -d "%") "$argv[2]" - tmux refresh -S + env TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_$argv[1]_(_powerline_tmux_pane) "$argv[2]" + env TMUX="$_POWERLINE_TMUX" tmux refresh -S end function --on-variable PWD _powerline_tmux_set_pwd _powerline_tmux_setenv PWD "$PWD" diff --git a/powerline/bindings/rc/powerline.rc b/powerline/bindings/rc/powerline.rc index 15b313a9d..a6d96eff9 100644 --- a/powerline/bindings/rc/powerline.rc +++ b/powerline/bindings/rc/powerline.rc @@ -36,6 +36,14 @@ fn _powerline_common_setup { _POWERLINE_SAVED_PWD = '' } +fn _powerline_tmux_pane { + if (test x$TMUX_PANE '!=' x) { + echo $TMUX_PANE | tr -d ' %' + } else { + TMUX=$_POWERLINE_TMUX tmux display -p '#D' | tr -d ' %' + } +} + fn _powerline_tmux_setenv { } @@ -73,7 +81,7 @@ if (test x$POWERLINE_CONFIG_COMMAND '!=' x) { fn _powerline_tmux_setenv { if (test x$2 '!=' x) { TMUX=$_POWERLINE_TMUX tmux setenv -g TMUX_$1^_`{ - TMUX=$_POWERLINE_TMUX tmux display -p '#D' | tr -d % + _powerline_tmux_pane } $2 } } diff --git a/powerline/bindings/shell/powerline.sh b/powerline/bindings/shell/powerline.sh index 3b8261d7b..d2339a1b4 100644 --- a/powerline/bindings/shell/powerline.sh +++ b/powerline/bindings/shell/powerline.sh @@ -104,8 +104,13 @@ _powerline_set_command() { fi } +_powerline_tmux_pane() { + echo "${TMUX_PANE:-`TMUX="$_POWERLINE_TMUX" tmux display -p "#D"`}" | \ + tr -d ' %' +} + _powerline_tmux_setenv() { - TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_"$1"_`tmux display -p "#D" | tr -d %` "$2" + TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_"$1"_`_powerline_tmux_pane` "$2" TMUX="$_POWERLINE_TMUX" tmux refresh -S } diff --git a/powerline/bindings/tcsh/powerline.tcsh b/powerline/bindings/tcsh/powerline.tcsh index bba34280a..4897b4c12 100644 --- a/powerline/bindings/tcsh/powerline.tcsh +++ b/powerline/bindings/tcsh/powerline.tcsh @@ -21,7 +21,17 @@ else endif endif if ( { $POWERLINE_CONFIG_COMMAND shell --shell=tcsh uses tmux } ) then - alias _powerline_tmux_set_pwd 'if ( $?TMUX && { tmux refresh -S >&/dev/null } ) tmux setenv -g TMUX_PWD_`tmux display -p "#D" | tr -d %` $PWD:q ; if ( $?TMUX ) tmux refresh -S >&/dev/null' + if ( $?TMUX_PANE ) then + if ( "$TMUX_PANE" == "" ) then + set _POWERLINE_TMUX_PANE="`tmux display -p '#D'`" + else + set _POWERLINE_TMUX_PANE="$TMUX_PANE" + endif + else + set _POWERLINE_TMUX_PANE="`tmux display -p '#D'`" + endif + set _POWERLINE_TMUX_PANE="`echo $_POWERLINE_TMUX_PANE:q | tr -d '% '`" + alias _powerline_tmux_set_pwd 'if ( $?TMUX && { tmux refresh -S >&/dev/null } ) tmux setenv -g TMUX_PWD_$_POWERLINE_TMUX_PANE $PWD:q ; if ( $?TMUX ) tmux refresh -S >&/dev/null' alias cwdcmd "`alias cwdcmd` ; _powerline_tmux_set_pwd" endif if ( { $POWERLINE_CONFIG_COMMAND shell --shell=tcsh uses prompt } ) then diff --git a/powerline/bindings/zsh/powerline.zsh b/powerline/bindings/zsh/powerline.zsh index 9c9024408..d1374350b 100644 --- a/powerline/bindings/zsh/powerline.zsh +++ b/powerline/bindings/zsh/powerline.zsh @@ -20,6 +20,11 @@ _powerline_append_precmd_function() { integer _POWERLINE_JOBNUM +_powerline_tmux_pane() { + local -x TMUX="$_POWERLINE_TMUX" + echo "${TMUX_PANE:-`tmux display -p "#D"`}" | tr -d ' %' +} + _powerline_init_tmux_support() { emulate -L zsh if test -n "$TMUX" && tmux refresh -S &>/dev/null ; then @@ -29,7 +34,7 @@ _powerline_init_tmux_support() { function -g _powerline_tmux_setenv() { emulate -L zsh local -x TMUX="$_POWERLINE_TMUX" - tmux setenv -g TMUX_"$1"_$(tmux display -p "#D" | tr -d %) "$2" + tmux setenv -g TMUX_"$1"_$(_powerline_tmux_pane) "$2" tmux refresh -S } From be762da476a86d18a1b5d489c70e8d1f1eeda418 Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 17 Sep 2016 18:24:47 +0300 Subject: [PATCH 05/18] Provide explicit scope information in powerline.zsh Fixes #1647 --- powerline/bindings/zsh/powerline.zsh | 36 ++++++++++++++-------------- tests/test_shells/input.zsh | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/powerline/bindings/zsh/powerline.zsh b/powerline/bindings/zsh/powerline.zsh index d1374350b..7dd855790 100644 --- a/powerline/bindings/zsh/powerline.zsh +++ b/powerline/bindings/zsh/powerline.zsh @@ -1,4 +1,4 @@ -_POWERLINE_SOURCED="$0:A" +local _POWERLINE_SOURCED="$0:A" _powerline_columns_fallback() { if which stty &>/dev/null ; then @@ -18,7 +18,7 @@ _powerline_append_precmd_function() { fi } -integer _POWERLINE_JOBNUM +integer -g _POWERLINE_JOBNUM=0 _powerline_tmux_pane() { local -x TMUX="$_POWERLINE_TMUX" @@ -58,11 +58,11 @@ _powerline_init_modes_support() { test -z "$ZSH_VERSION" && return 0 - typeset -ga VS - VS=( ${(s:.:)ZSH_VERSION} ) + local -a vs + vs=( ${(s:.:)ZSH_VERSION} ) # Mode support requires >=zsh-4.3.11 - if (( VS[1] < 4 || (VS[1] == 4 && (VS[2] < 3 || (VS[2] == 3 && VS[3] < 11))) )) ; then + if (( vs[1] < 4 || (vs[1] == 4 && (vs[2] < 3 || (vs[2] == 3 && vs[3] < 11))) )) ; then return 0 fi @@ -71,7 +71,7 @@ _powerline_init_modes_support() { } function -g _powerline_set_true_keymap_name() { - _POWERLINE_MODE="${1}" + typeset -g _POWERLINE_MODE="${1}" local plm_bk="$(bindkey -lL ${_POWERLINE_MODE})" if [[ $plm_bk = 'bindkey -A'* ]] ; then _powerline_set_true_keymap_name ${(Q)${${(z)plm_bk}[3]}} @@ -94,7 +94,7 @@ _powerline_init_modes_support() { _powerline_set_main_keymap_name if [[ "$_POWERLINE_MODE" != vi* ]] ; then - _POWERLINE_DEFAULT_MODE="$_POWERLINE_MODE" + typeset -g _POWERLINE_DEFAULT_MODE="$_POWERLINE_MODE" fi _powerline_append_precmd_function _powerline_set_main_keymap_name @@ -111,7 +111,7 @@ _powerline_set_jobnum() { # ([ is in first column). You see: any line counting thingie will return # wrong number of jobs. You need to filter the lines first. Or not use # jobs built-in at all. - _POWERLINE_JOBNUM=${(%):-%j} + integer -g _POWERLINE_JOBNUM=${(%):-%j} } _powerline_update_counter() { @@ -123,7 +123,7 @@ _powerline_setup_prompt() { _powerline_append_precmd_function _powerline_set_jobnum - VIRTUAL_ENV_DISABLE_PROMPT=1 + typeset -g VIRTUAL_ENV_DISABLE_PROMPT=1 if test -z "${POWERLINE_NO_ZSH_ZPYTHON}" && { zmodload libzpython || zmodload zsh/zpython } &>/dev/null ; then _powerline_append_precmd_function _powerline_update_counter @@ -142,7 +142,7 @@ _powerline_setup_prompt() { } else if test -z "${POWERLINE_COMMAND}" ; then - POWERLINE_COMMAND="$($POWERLINE_CONFIG_COMMAND shell command)" + typeset -g POWERLINE_COMMAND="$($POWERLINE_CONFIG_COMMAND shell command)" fi local add_args='-r .zsh' @@ -159,11 +159,11 @@ _powerline_setup_prompt() { local add_args_2=$add_args$new_args_2 add_args+=' --width=$(( ${COLUMNS:-$(_powerline_columns_fallback)} - ${ZLE_RPROMPT_INDENT:-1} ))' local add_args_r2=$add_args$new_args_2 - PS1='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell aboveleft '$add_args')' - RPS1='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell right '$add_args')' - PS2='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell left '$add_args_2')' - RPS2='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell right '$add_args_r2')' - PS3='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell left '$add_args_3')' + typeset -g PS1='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell aboveleft '$add_args')' + typeset -g RPS1='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell right '$add_args')' + typeset -g PS2='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell left '$add_args_2')' + typeset -g RPS2='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell right '$add_args_r2')' + typeset -g PS3='$("$POWERLINE_COMMAND" $=POWERLINE_COMMAND_ARGS shell left '$add_args_3')' fi } @@ -187,15 +187,15 @@ _powerline_add_widget() { eval "function $save_widget() { emulate -L zsh; $widget \$@ }" eval "${old_widget_command/$widget/$save_widget}" zle -N $widget $function - _POWERLINE_SAVE_WIDGET="$save_widget" + typeset -g _POWERLINE_SAVE_WIDGET="$save_widget" fi } if test -z "${POWERLINE_CONFIG_COMMAND}" ; then if which powerline-config >/dev/null ; then - POWERLINE_CONFIG_COMMAND=powerline-config + typeset -g POWERLINE_CONFIG_COMMAND=powerline-config else - POWERLINE_CONFIG_COMMAND="$_POWERLINE_SOURCED:h:h:h:h/scripts/powerline-config" + typeset -g POWERLINE_CONFIG_COMMAND="${_POWERLINE_SOURCED:h:h:h:h}/scripts/powerline-config" fi fi diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index ab71ee6c4..ce29ddce4 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -2,6 +2,7 @@ unset HOME unsetopt promptsp notransientrprompt setopt interactivecomments setopt autonamedirs +setopt warncreateglobal function set_theme_option() { export POWERLINE_THEME_OVERRIDES="${POWERLINE_THEME_OVERRIDES};$1=$2" powerline-reload-config From 32b24593d2797097c394cacd4d2ed996b93211a8 Mon Sep 17 00:00:00 2001 From: Dmitry Petrich Date: Tue, 25 Oct 2016 15:23:07 +0300 Subject: [PATCH 06/18] Fixed colors gradients in default and solarized --- .../config_files/colorschemes/default.json | 94 ++++++++++--------- .../config_files/colorschemes/solarized.json | 67 ++++++------- 2 files changed, 83 insertions(+), 78 deletions(-) diff --git a/powerline/config_files/colorschemes/default.json b/powerline/config_files/colorschemes/default.json index 89f17c3c3..ce806bd0a 100644 --- a/powerline/config_files/colorschemes/default.json +++ b/powerline/config_files/colorschemes/default.json @@ -2,53 +2,55 @@ "name": "Default", "groups": { "information:additional": { "fg": "gray9", "bg": "gray4", "attrs": [] }, - "information:regular": { "fg": "gray10", "bg": "gray4", "attrs": ["bold"] }, + "information:regular": { "fg": "gray10", "bg": "gray4", "attrs": ["bold"] }, "information:highlighted": { "fg": "white", "bg": "gray4", "attrs": [] }, "information:priority": { "fg": "brightyellow", "bg": "mediumorange", "attrs": [] }, - "warning:regular": { "fg": "white", "bg": "brightred", "attrs": ["bold"] }, - "critical:failure": { "fg": "white", "bg": "darkestred", "attrs": [] }, - "critical:success": { "fg": "white", "bg": "darkestgreen", "attrs": [] }, - "background": { "fg": "white", "bg": "gray0", "attrs": [] }, - "background:divider": { "fg": "gray5", "bg": "gray0", "attrs": [] }, - "session": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, - "date": { "fg": "gray8", "bg": "gray2", "attrs": [] }, - "time": { "fg": "gray10", "bg": "gray2", "attrs": ["bold"] }, - "time:divider": { "fg": "gray5", "bg": "gray2", "attrs": [] }, - "email_alert": "warning:regular", - "email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attrs": ["bold"] }, - "hostname": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, - "weather": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "weather_temp_gradient": { "fg": "blue_red", "bg": "gray0", "attrs": [] }, - "weather_condition_hot": { "fg": "khaki1", "bg": "gray0", "attrs": [] }, - "weather_condition_snowy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, - "weather_condition_rainy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, - "uptime": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "external_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "internal_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "network_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "network_load:divider": "background:divider", - "system_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "system_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "environment": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "cpu_load_percent": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "cpu_load_percent_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "battery": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "battery_gradient": { "fg": "white_red", "bg": "gray0", "attrs": [] }, - "battery_full": { "fg": "red", "bg": "gray0", "attrs": [] }, - "battery_empty": { "fg": "white", "bg": "gray0", "attrs": [] }, - "player": { "fg": "gray10", "bg": "black", "attrs": [] }, - "user": { "fg": "white", "bg": "darkblue", "attrs": ["bold"] }, - "branch": { "fg": "gray9", "bg": "gray2", "attrs": [] }, - "branch_dirty": { "fg": "brightyellow", "bg": "gray2", "attrs": [] }, - "branch_clean": { "fg": "gray9", "bg": "gray2", "attrs": [] }, - "branch:divider": { "fg": "gray7", "bg": "gray2", "attrs": [] }, - "stash": "branch_dirty", - "stash:divider": "branch:divider", - "cwd": "information:additional", - "cwd:current_folder": "information:regular", - "cwd:divider": { "fg": "gray7", "bg": "gray4", "attrs": [] }, - "virtualenv": { "fg": "white", "bg": "darkcyan", "attrs": [] }, - "attached_clients": { "fg": "gray8", "bg": "gray0", "attrs": [] } + "warning:regular": { "fg": "white", "bg": "brightred", "attrs": ["bold"] }, + "critical:failure": { "fg": "white", "bg": "darkestred", "attrs": [] }, + "critical:success": { "fg": "white", "bg": "darkestgreen", "attrs": [] }, + "background": { "fg": "white", "bg": "gray0", "attrs": [] }, + "background:divider": { "fg": "gray5", "bg": "gray0", "attrs": [] }, + "session": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, + "date": { "fg": "gray8", "bg": "gray2", "attrs": [] }, + "time": { "fg": "gray10", "bg": "gray2", "attrs": ["bold"] }, + "time:divider": { "fg": "gray5", "bg": "gray2", "attrs": [] }, + "email_alert": "warning:regular", + "email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attrs": ["bold"] }, + "hostname": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, + "weather": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "weather_temp_gradient": { "fg": "blue_red", "bg": "gray0", "attrs": [] }, + "weather_condition_hot": { "fg": "khaki1", "bg": "gray0", "attrs": [] }, + "weather_condition_snowy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, + "weather_condition_rainy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, + "uptime": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "external_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "internal_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "network_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "network_load_sent_gradient": "network_load_gradient", + "network_load_recv_gradient": "network_load_gradient", + "network_load:divider": "background:divider", + "system_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "system_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "environment": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "cpu_load_percent": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "cpu_load_percent_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "battery": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "battery_gradient": { "fg": "white_red", "bg": "gray0", "attrs": [] }, + "battery_full": { "fg": "red", "bg": "gray0", "attrs": [] }, + "battery_empty": { "fg": "white", "bg": "gray0", "attrs": [] }, + "player": { "fg": "gray10", "bg": "black", "attrs": [] }, + "user": { "fg": "white", "bg": "darkblue", "attrs": ["bold"] }, + "branch": { "fg": "gray9", "bg": "gray2", "attrs": [] }, + "branch_dirty": { "fg": "brightyellow", "bg": "gray2", "attrs": [] }, + "branch_clean": { "fg": "gray9", "bg": "gray2", "attrs": [] }, + "branch:divider": { "fg": "gray7", "bg": "gray2", "attrs": [] }, + "stash": "branch_dirty", + "stash:divider": "branch:divider", + "cwd": "information:additional", + "cwd:current_folder": "information:regular", + "cwd:divider": { "fg": "gray7", "bg": "gray4", "attrs": [] }, + "virtualenv": { "fg": "white", "bg": "darkcyan", "attrs": [] }, + "attached_clients": { "fg": "gray8", "bg": "gray0", "attrs": [] } } } diff --git a/powerline/config_files/colorschemes/solarized.json b/powerline/config_files/colorschemes/solarized.json index 4f11fa47f..619031fc0 100644 --- a/powerline/config_files/colorschemes/solarized.json +++ b/powerline/config_files/colorschemes/solarized.json @@ -1,37 +1,40 @@ { "name": "Solarized dark", "groups": { - "information:additional": { "fg": "solarized:base2", "bg": "solarized:base01", "attrs": [] }, - "information:regular": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"] }, - "information:highlighted": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"]}, - "information:priority": { "fg": "solarized:base3", "bg": "solarized:yellow", "attrs": [] }, - "warning:regular": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, - "critical:failure": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, - "critical:success": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "background": { "fg": "solarized:base3", "bg": "solarized:base02", "attrs": [] }, - "background:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "user": { "fg": "solarized:base3", "bg": "solarized:blue", "attrs": ["bold"] }, - "virtualenv": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "branch": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "branch_dirty": { "fg": "solarized:yellow", "bg": "solarized:base02", "attrs": [] }, - "branch_clean": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "stash": "branch_dirty", - "email_alert_gradient": { "fg": "solarized:base3", "bg": "yellow_orange_red", "attrs": [] }, - "email_alert": "warning:regular", - "cwd": "information:additional", - "cwd:current_folder": "information:regular", - "cwd:divider": { "fg": "solarized:base1", "bg": "solarized:base01", "attrs": [] }, - "network_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "network_load:divider": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "hostname": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": [] }, - "environment": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "attached_clients": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "date": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "time": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": ["bold"] }, - "time:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "system_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "weather_temp_gradient": { "fg": "blue_red", "bg": "solarized:base03", "attrs": [] }, - "weather": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "uptime": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] } + "information:additional": { "fg": "solarized:base2", "bg": "solarized:base01", "attrs": [] }, + "information:regular": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"] }, + "information:highlighted": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"]}, + "information:priority": { "fg": "solarized:base3", "bg": "solarized:yellow", "attrs": [] }, + "warning:regular": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, + "critical:failure": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, + "critical:success": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "background": { "fg": "solarized:base3", "bg": "solarized:base02", "attrs": [] }, + "background:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "user": { "fg": "solarized:base3", "bg": "solarized:blue", "attrs": ["bold"] }, + "virtualenv": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "branch": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "branch_dirty": { "fg": "solarized:yellow", "bg": "solarized:base02", "attrs": [] }, + "branch_clean": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "stash": "branch_dirty", + "email_alert_gradient": { "fg": "solarized:base3", "bg": "yellow_orange_red", "attrs": [] }, + "email_alert": "warning:regular", + "cwd": "information:additional", + "cwd:current_folder": "information:regular", + "cwd:divider": { "fg": "solarized:base1", "bg": "solarized:base01", "attrs": [] }, + "network_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "network_load:divider": "network_load", + "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "solarized:base03", "attrs": [] }, + "network_load_sent_gradient": "network_load_gradient", + "network_load_recv_gradient": "network_load_gradient", + "hostname": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": [] }, + "environment": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "attached_clients": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "date": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "time": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": ["bold"] }, + "time:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "system_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "weather_temp_gradient": { "fg": "blue_red", "bg": "solarized:base03", "attrs": [] }, + "weather": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "uptime": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] } } } From f67ea65057c5c81b973121e257c64d2629a194f9 Mon Sep 17 00:00:00 2001 From: Dmitry Petrich Date: Wed, 26 Oct 2016 03:07:47 +0300 Subject: [PATCH 07/18] Tab alignments replaced by spaces --- .../config_files/colorschemes/default.json | 102 +++++++++--------- .../config_files/colorschemes/solarized.json | 70 ++++++------ 2 files changed, 86 insertions(+), 86 deletions(-) diff --git a/powerline/config_files/colorschemes/default.json b/powerline/config_files/colorschemes/default.json index ce806bd0a..7e271ef36 100644 --- a/powerline/config_files/colorschemes/default.json +++ b/powerline/config_files/colorschemes/default.json @@ -1,56 +1,56 @@ { "name": "Default", "groups": { - "information:additional": { "fg": "gray9", "bg": "gray4", "attrs": [] }, - "information:regular": { "fg": "gray10", "bg": "gray4", "attrs": ["bold"] }, - "information:highlighted": { "fg": "white", "bg": "gray4", "attrs": [] }, - "information:priority": { "fg": "brightyellow", "bg": "mediumorange", "attrs": [] }, - "warning:regular": { "fg": "white", "bg": "brightred", "attrs": ["bold"] }, - "critical:failure": { "fg": "white", "bg": "darkestred", "attrs": [] }, - "critical:success": { "fg": "white", "bg": "darkestgreen", "attrs": [] }, - "background": { "fg": "white", "bg": "gray0", "attrs": [] }, - "background:divider": { "fg": "gray5", "bg": "gray0", "attrs": [] }, - "session": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, - "date": { "fg": "gray8", "bg": "gray2", "attrs": [] }, - "time": { "fg": "gray10", "bg": "gray2", "attrs": ["bold"] }, - "time:divider": { "fg": "gray5", "bg": "gray2", "attrs": [] }, - "email_alert": "warning:regular", - "email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attrs": ["bold"] }, - "hostname": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, - "weather": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "weather_temp_gradient": { "fg": "blue_red", "bg": "gray0", "attrs": [] }, - "weather_condition_hot": { "fg": "khaki1", "bg": "gray0", "attrs": [] }, - "weather_condition_snowy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, - "weather_condition_rainy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, - "uptime": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "external_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "internal_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "network_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "network_load_sent_gradient": "network_load_gradient", - "network_load_recv_gradient": "network_load_gradient", - "network_load:divider": "background:divider", - "system_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "system_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "environment": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "cpu_load_percent": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "cpu_load_percent_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, - "battery": { "fg": "gray8", "bg": "gray0", "attrs": [] }, - "battery_gradient": { "fg": "white_red", "bg": "gray0", "attrs": [] }, - "battery_full": { "fg": "red", "bg": "gray0", "attrs": [] }, - "battery_empty": { "fg": "white", "bg": "gray0", "attrs": [] }, - "player": { "fg": "gray10", "bg": "black", "attrs": [] }, - "user": { "fg": "white", "bg": "darkblue", "attrs": ["bold"] }, - "branch": { "fg": "gray9", "bg": "gray2", "attrs": [] }, - "branch_dirty": { "fg": "brightyellow", "bg": "gray2", "attrs": [] }, - "branch_clean": { "fg": "gray9", "bg": "gray2", "attrs": [] }, - "branch:divider": { "fg": "gray7", "bg": "gray2", "attrs": [] }, - "stash": "branch_dirty", - "stash:divider": "branch:divider", - "cwd": "information:additional", - "cwd:current_folder": "information:regular", - "cwd:divider": { "fg": "gray7", "bg": "gray4", "attrs": [] }, - "virtualenv": { "fg": "white", "bg": "darkcyan", "attrs": [] }, - "attached_clients": { "fg": "gray8", "bg": "gray0", "attrs": [] } + "information:additional": { "fg": "gray9", "bg": "gray4", "attrs": [] }, + "information:regular": { "fg": "gray10", "bg": "gray4", "attrs": ["bold"] }, + "information:highlighted": { "fg": "white", "bg": "gray4", "attrs": [] }, + "information:priority": { "fg": "brightyellow", "bg": "mediumorange", "attrs": [] }, + "warning:regular": { "fg": "white", "bg": "brightred", "attrs": ["bold"] }, + "critical:failure": { "fg": "white", "bg": "darkestred", "attrs": [] }, + "critical:success": { "fg": "white", "bg": "darkestgreen", "attrs": [] }, + "background": { "fg": "white", "bg": "gray0", "attrs": [] }, + "background:divider": { "fg": "gray5", "bg": "gray0", "attrs": [] }, + "session": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, + "date": { "fg": "gray8", "bg": "gray2", "attrs": [] }, + "time": { "fg": "gray10", "bg": "gray2", "attrs": ["bold"] }, + "time:divider": { "fg": "gray5", "bg": "gray2", "attrs": [] }, + "email_alert": "warning:regular", + "email_alert_gradient": { "fg": "white", "bg": "yellow_orange_red", "attrs": ["bold"] }, + "hostname": { "fg": "black", "bg": "gray10", "attrs": ["bold"] }, + "weather": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "weather_temp_gradient": { "fg": "blue_red", "bg": "gray0", "attrs": [] }, + "weather_condition_hot": { "fg": "khaki1", "bg": "gray0", "attrs": [] }, + "weather_condition_snowy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, + "weather_condition_rainy": { "fg": "skyblue1", "bg": "gray0", "attrs": [] }, + "uptime": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "external_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "internal_ip": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "network_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "network_load_sent_gradient": "network_load_gradient", + "network_load_recv_gradient": "network_load_gradient", + "network_load:divider": "background:divider", + "system_load": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "system_load_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "environment": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "cpu_load_percent": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "cpu_load_percent_gradient": { "fg": "green_yellow_orange_red", "bg": "gray0", "attrs": [] }, + "battery": { "fg": "gray8", "bg": "gray0", "attrs": [] }, + "battery_gradient": { "fg": "white_red", "bg": "gray0", "attrs": [] }, + "battery_full": { "fg": "red", "bg": "gray0", "attrs": [] }, + "battery_empty": { "fg": "white", "bg": "gray0", "attrs": [] }, + "player": { "fg": "gray10", "bg": "black", "attrs": [] }, + "user": { "fg": "white", "bg": "darkblue", "attrs": ["bold"] }, + "branch": { "fg": "gray9", "bg": "gray2", "attrs": [] }, + "branch_dirty": { "fg": "brightyellow", "bg": "gray2", "attrs": [] }, + "branch_clean": { "fg": "gray9", "bg": "gray2", "attrs": [] }, + "branch:divider": { "fg": "gray7", "bg": "gray2", "attrs": [] }, + "stash": "branch_dirty", + "stash:divider": "branch:divider", + "cwd": "information:additional", + "cwd:current_folder": "information:regular", + "cwd:divider": { "fg": "gray7", "bg": "gray4", "attrs": [] }, + "virtualenv": { "fg": "white", "bg": "darkcyan", "attrs": [] }, + "attached_clients": { "fg": "gray8", "bg": "gray0", "attrs": [] } } } diff --git a/powerline/config_files/colorschemes/solarized.json b/powerline/config_files/colorschemes/solarized.json index 619031fc0..c0eba5aea 100644 --- a/powerline/config_files/colorschemes/solarized.json +++ b/powerline/config_files/colorschemes/solarized.json @@ -1,40 +1,40 @@ { "name": "Solarized dark", "groups": { - "information:additional": { "fg": "solarized:base2", "bg": "solarized:base01", "attrs": [] }, - "information:regular": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"] }, - "information:highlighted": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"]}, - "information:priority": { "fg": "solarized:base3", "bg": "solarized:yellow", "attrs": [] }, - "warning:regular": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, - "critical:failure": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, - "critical:success": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "background": { "fg": "solarized:base3", "bg": "solarized:base02", "attrs": [] }, - "background:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "user": { "fg": "solarized:base3", "bg": "solarized:blue", "attrs": ["bold"] }, - "virtualenv": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "branch": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "branch_dirty": { "fg": "solarized:yellow", "bg": "solarized:base02", "attrs": [] }, - "branch_clean": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "stash": "branch_dirty", - "email_alert_gradient": { "fg": "solarized:base3", "bg": "yellow_orange_red", "attrs": [] }, - "email_alert": "warning:regular", - "cwd": "information:additional", - "cwd:current_folder": "information:regular", - "cwd:divider": { "fg": "solarized:base1", "bg": "solarized:base01", "attrs": [] }, - "network_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "network_load:divider": "network_load", - "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "solarized:base03", "attrs": [] }, - "network_load_sent_gradient": "network_load_gradient", - "network_load_recv_gradient": "network_load_gradient", - "hostname": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": [] }, - "environment": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "attached_clients": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, - "date": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "time": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": ["bold"] }, - "time:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, - "system_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "weather_temp_gradient": { "fg": "blue_red", "bg": "solarized:base03", "attrs": [] }, - "weather": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, - "uptime": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] } + "information:additional": { "fg": "solarized:base2", "bg": "solarized:base01", "attrs": [] }, + "information:regular": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"] }, + "information:highlighted": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"]}, + "information:priority": { "fg": "solarized:base3", "bg": "solarized:yellow", "attrs": [] }, + "warning:regular": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, + "critical:failure": { "fg": "solarized:base3", "bg": "solarized:red", "attrs": [] }, + "critical:success": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "background": { "fg": "solarized:base3", "bg": "solarized:base02", "attrs": [] }, + "background:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "user": { "fg": "solarized:base3", "bg": "solarized:blue", "attrs": ["bold"] }, + "virtualenv": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "branch": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "branch_dirty": { "fg": "solarized:yellow", "bg": "solarized:base02", "attrs": [] }, + "branch_clean": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "stash": "branch_dirty", + "email_alert_gradient": { "fg": "solarized:base3", "bg": "yellow_orange_red", "attrs": [] }, + "email_alert": "warning:regular", + "cwd": "information:additional", + "cwd:current_folder": "information:regular", + "cwd:divider": { "fg": "solarized:base1", "bg": "solarized:base01", "attrs": [] }, + "network_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "network_load:divider": "network_load", + "network_load_gradient": { "fg": "green_yellow_orange_red", "bg": "solarized:base03", "attrs": [] }, + "network_load_sent_gradient": "network_load_gradient", + "network_load_recv_gradient": "network_load_gradient", + "hostname": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": [] }, + "environment": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "attached_clients": { "fg": "solarized:base3", "bg": "solarized:green", "attrs": [] }, + "date": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "time": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": ["bold"] }, + "time:divider": { "fg": "solarized:base1", "bg": "solarized:base02", "attrs": [] }, + "system_load": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "weather_temp_gradient": { "fg": "blue_red", "bg": "solarized:base03", "attrs": [] }, + "weather": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] }, + "uptime": { "fg": "solarized:base1", "bg": "solarized:base03", "attrs": [] } } } From 18192db3daee463023f1959cfcd5a880307e4df0 Mon Sep 17 00:00:00 2001 From: Stephon Date: Fri, 28 Oct 2016 11:06:18 -0400 Subject: [PATCH 08/18] Fixed grammar --- docs/source/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 507b432bb..909efa5f6 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -95,7 +95,7 @@ Fonts installation Powerline uses several special glyphs to get the arrow effect and some custom symbols for developers. This requires having either a symbol font or a patched -font installed in the system. Used application (e.g. terminal emulator) must +font installed in the system. The used application (e.g. terminal emulator) must also either be configured to use patched fonts (in some cases even support it because custom glyphs live in private use area which some applications reserve for themselves) or support fontconfig for powerline to work properly with From 373952684ac26a1604d5e9d99783c6139ea72a6c Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 29 Oct 2016 15:37:01 +0300 Subject: [PATCH 09/18] Provide another default theme with less troublesome characters Ref #1652 --- docs/source/configuration/reference.rst | 5 +- powerline/__init__.py | 2 +- powerline/config_files/themes/powerline.json | 8 +- .../themes/powerline_terminus.json | 146 ++++++++++++++++++ 4 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 powerline/config_files/themes/powerline_terminus.json diff --git a/docs/source/configuration/reference.rst b/docs/source/configuration/reference.rst index c93cc0cec..6b6226870 100644 --- a/docs/source/configuration/reference.rst +++ b/docs/source/configuration/reference.rst @@ -144,8 +144,8 @@ Common configuration is a subdictionary that is a value of ``common`` key in ``default_top_theme`` String, determines which top-level theme will be used as the default. - Defaults to ``powerline`` in unicode locales and ``ascii`` in non-unicode - locales. See `Themes`_ section for more details. + Defaults to ``powerline_terminus`` in unicode locales and ``ascii`` in + non-unicode locales. See `Themes`_ section for more details. Extension-specific configuration -------------------------------- @@ -331,6 +331,7 @@ powerline_unicode7 Theme with powerline dividers and unicode-7 symbols unicode Theme without any symbols from private use area unicode_terminus Theme containing only symbols from terminus PCF font unicode_terminus_condensed Like above, but occupies as less space as possible +powerline_terminus Like unicode_terminus, but with powerline symbols ascii Theme without any unicode characters at all ========================== ==================================================== diff --git a/powerline/__init__.py b/powerline/__init__.py index cd9e47d93..ac2375954 100644 --- a/powerline/__init__.py +++ b/powerline/__init__.py @@ -310,7 +310,7 @@ def finish_common_config(encoding, common_config): ''' encoding = encoding.lower() if encoding.startswith('utf') or encoding.startswith('ucs'): - default_top_theme = 'powerline' + default_top_theme = 'powerline_terminus' else: default_top_theme = 'ascii' diff --git a/powerline/config_files/themes/powerline.json b/powerline/config_files/themes/powerline.json index db8246b70..8eb208ad5 100644 --- a/powerline/config_files/themes/powerline.json +++ b/powerline/config_files/themes/powerline.json @@ -117,10 +117,10 @@ }, "powerline.segments.vim.visual_range": { "args": { - "CTRL_V_text": "{rows} × {vcols}", - "v_text_oneline": "C:{vcols}", - "v_text_multiline": "L:{rows}", - "V_text": "L:{rows}" + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" } }, "powerline.segments.vim.readonly_indicator": { diff --git a/powerline/config_files/themes/powerline_terminus.json b/powerline/config_files/themes/powerline_terminus.json new file mode 100644 index 000000000..caef6db32 --- /dev/null +++ b/powerline/config_files/themes/powerline_terminus.json @@ -0,0 +1,146 @@ +{ + "dividers": { + "left": { + "hard": " ", + "soft": " " + }, + "right": { + "hard": " ", + "soft": " " + } + }, + "spaces": 1, + "segment_data": { + "branch": { + "before": " " + }, + "stash": { + "before": "ST " + }, + "cwd": { + "args": { + "ellipsis": "…" + } + }, + + "line_current_symbol": { + "contents": " " + }, + "player": { + "args": { + "state_symbols": { + "fallback": "♫", + "play": "▶", + "pause": "▮▮", + "stop": "■" + } + } + }, + + "time": { + "before": "" + }, + + "powerline.segments.common.net.network_load": { + "args": { + "recv_format": "⇓ {value:>8}", + "sent_format": "⇑ {value:>8}" + } + }, + "powerline.segments.common.net.hostname": { + "before": " " + }, + "powerline.segments.common.bat.battery": { + "args": { + "full_heart": "♥", + "empty_heart": "♥", + "online": "⚡︎", + "offline": " " + } + }, + "powerline.segments.common.sys.uptime": { + "before": "↑ " + }, + "powerline.segments.common.mail.email_imap_alert": { + "before": "MAIL " + }, + "powerline.segments.common.env.virtualenv": { + "before": "(e) " + }, + "powerline.segments.common.wthr.weather": { + "args": { + "icons": { + "day": "DAY", + "blustery": "WIND", + "rainy": "RAIN", + "cloudy": "CLOUDS", + "snowy": "SNOW", + "stormy": "STORM", + "foggy": "FOG", + "sunny": "SUN", + "night": "NIGHT", + "windy": "WINDY", + "not_available": "NA", + "unknown": "UKN" + } + } + }, + "powerline.segments.common.time.fuzzy_time": { + "args": { + "unicode_text": true + } + }, + + "powerline.segments.vim.mode": { + "args": { + "override": { + "n": "NORMAL", + "no": "N·OPER", + "v": "VISUAL", + "V": "V·LINE", + "^V": "V·BLCK", + "s": "SELECT", + "S": "S·LINE", + "^S": "S·BLCK", + "i": "INSERT", + "R": "RPLACE", + "Rv": "V·RPLC", + "c": "COMMND", + "cv": "VIM·EX", + "ce": "NRM·EX", + "r": "PROMPT", + "rm": "-MORE-", + "r?": "CNFIRM", + "!": "!SHELL" + } + } + }, + "powerline.segments.vim.visual_range": { + "args": { + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" + } + }, + "powerline.segments.vim.readonly_indicator": { + "args": { + "text": "" + } + }, + "powerline.segments.vim.modified_indicator": { + "args": { + "text": "+" + } + }, + + "powerline.segments.i3wm.scratchpad": { + "args": { + "icons": { + "fresh": "●", + "changed": "○" + } + } + } + } +} From 23f663f228e09de34ffb5834bf9aa49247a913ad Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 29 Oct 2016 15:41:12 +0300 Subject: [PATCH 10/18] =?UTF-8?q?Also=20modify=20=E2=80=A6.visual=5Frange?= =?UTF-8?q?=20segment=E2=80=99s=20symbols=20in=20other=20unicode=20themes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- powerline/config_files/themes/powerline_unicode7.json | 8 ++++---- powerline/config_files/themes/unicode.json | 8 ++++---- .../config_files/themes/unicode_terminus_condensed.json | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/powerline/config_files/themes/powerline_unicode7.json b/powerline/config_files/themes/powerline_unicode7.json index 0d3c5d13a..5411fd389 100644 --- a/powerline/config_files/themes/powerline_unicode7.json +++ b/powerline/config_files/themes/powerline_unicode7.json @@ -131,10 +131,10 @@ }, "powerline.segments.vim.visual_range": { "args": { - "CTRL_V_text": "{rows} × {vcols}", - "v_text_oneline": "C:{vcols}", - "v_text_multiline": "L:{rows}", - "V_text": "L:{rows}" + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" } }, "powerline.segments.vim.readonly_indicator": { diff --git a/powerline/config_files/themes/unicode.json b/powerline/config_files/themes/unicode.json index 049dcf08f..6c183a699 100644 --- a/powerline/config_files/themes/unicode.json +++ b/powerline/config_files/themes/unicode.json @@ -117,10 +117,10 @@ }, "powerline.segments.vim.visual_range": { "args": { - "CTRL_V_text": "{rows} × {vcols}", - "v_text_oneline": "C:{vcols}", - "v_text_multiline": "L:{rows}", - "V_text": "L:{rows}" + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" } }, "powerline.segments.vim.readonly_indicator": { diff --git a/powerline/config_files/themes/unicode_terminus_condensed.json b/powerline/config_files/themes/unicode_terminus_condensed.json index bac59be26..ddd758763 100644 --- a/powerline/config_files/themes/unicode_terminus_condensed.json +++ b/powerline/config_files/themes/unicode_terminus_condensed.json @@ -119,9 +119,9 @@ "powerline.segments.vim.visual_range": { "args": { "CTRL_V_text": "{rows}×{vcols}", - "v_text_oneline": "C:{vcols}", - "v_text_multiline": "L:{rows}", - "V_text": "L:{rows}" + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" } }, "powerline.segments.vim.readonly_indicator": { From 19f9885825078485053e98af0017aaeb4147e57b Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 29 Oct 2016 15:58:53 +0300 Subject: [PATCH 11/18] Fix python tests by abstracting away default theme name --- powerline/__init__.py | 18 ++++++++++++++---- tests/lib/config_mock.py | 6 +++++- tests/test_config_merging.py | 8 ++++---- tests/test_config_reload.py | 32 ++++++++++++++++---------------- tests/test_configuration.py | 24 ++++++++++++------------ 5 files changed, 51 insertions(+), 37 deletions(-) diff --git a/powerline/__init__.py b/powerline/__init__.py index ac2375954..96dbcd7f4 100644 --- a/powerline/__init__.py +++ b/powerline/__init__.py @@ -298,6 +298,18 @@ def create_logger(common_config, use_daemon_threads=True, ext='__unknown__', return logger, pl, get_module_attr +def get_default_theme(is_unicode=True): + '''Get default theme used by powerline + + :param bool is_unicode: + If true, return theme for unicode environments, otherwise return theme + that is supposed to be ASCII-only. + + :return: theme name. + ''' + return 'powerline_terminus' if is_unicode else 'ascii' + + def finish_common_config(encoding, common_config): '''Add default values to common config and expand ~ in paths @@ -309,10 +321,8 @@ def finish_common_config(encoding, common_config): paths. ''' encoding = encoding.lower() - if encoding.startswith('utf') or encoding.startswith('ucs'): - default_top_theme = 'powerline_terminus' - else: - default_top_theme = 'ascii' + default_top_theme = get_default_theme( + encoding.startswith('utf') or encoding.startswith('ucs')) common_config = common_config.copy() common_config.setdefault('default_top_theme', default_top_theme) diff --git a/tests/lib/config_mock.py b/tests/lib/config_mock.py index 9e0edf6d6..eaba015d0 100644 --- a/tests/lib/config_mock.py +++ b/tests/lib/config_mock.py @@ -10,11 +10,15 @@ from powerline.renderer import Renderer from powerline.lib.config import ConfigLoader -from powerline import Powerline +from powerline import Powerline, get_default_theme from tests.lib import Args, replace_attr +UT = get_default_theme(is_unicode=True) +AT = get_default_theme(is_unicode=False) + + class TestHelpers(object): def __init__(self, config): self.config = config diff --git a/tests/test_config_merging.py b/tests/test_config_merging.py index e0f3d80d4..7e8a13660 100644 --- a/tests/test_config_merging.py +++ b/tests/test_config_merging.py @@ -12,7 +12,7 @@ from powerline import Powerline from tests import TestCase -from tests.lib.config_mock import select_renderer +from tests.lib.config_mock import select_renderer, UT CONFIG_DIR = 'tests/config' @@ -88,7 +88,7 @@ '1/colors': colors_config(), '1/colorschemes/default': colorscheme_config(), '1/themes/test/default': theme_config(), - '1/themes/powerline': top_theme_config(), + '1/themes/' + UT: top_theme_config(), '1/themes/other1': mdc(top_theme_config(), { 'dividers': { 'left': { @@ -193,10 +193,10 @@ def test_root_config_merging(self): def test_top_theme_merging(self): with WithConfigTree(mdc(main_tree(), { - '2/themes/powerline': { + '2/themes/' + UT: { 'spaces': 1, }, - '3/themes/powerline': { + '3/themes/' + UT: { 'dividers': { 'left': { 'hard': '>>', diff --git a/tests/test_config_reload.py b/tests/test_config_reload.py index 6c835c2c7..e07b3deb1 100644 --- a/tests/test_config_reload.py +++ b/tests/test_config_reload.py @@ -6,7 +6,7 @@ from functools import wraps from tests import TestCase -from tests.lib.config_mock import get_powerline, add_watcher_events +from tests.lib.config_mock import get_powerline, add_watcher_events, UT config = { @@ -62,7 +62,7 @@ ], }, }, - 'themes/powerline': { + 'themes/' + UT: { 'dividers': { "left": { "hard": ">>", @@ -131,7 +131,7 @@ def assertAccessEvents(self, p, *args): def test_noreload(self, config): with get_powerline(config, run_once=True) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['config']['common']['spaces'] = 1 add_watcher_events(p, 'config', wait=False, interval=0.05) # When running once thread should not start @@ -143,7 +143,7 @@ def test_noreload(self, config): def test_reload_main(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['config']['common']['default_top_theme'] = 'other' add_watcher_events(p, 'config') @@ -205,7 +205,7 @@ def test_reload_main(self, config): def test_reload_unexistent(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['config']['ext']['test']['colorscheme'] = 'nonexistentraise' add_watcher_events(p, 'config') @@ -242,7 +242,7 @@ def test_reload_unexistent(self, config): def test_reload_colors(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['colors']['colors']['col1'] = 5 add_watcher_events(p, 'colors') @@ -254,7 +254,7 @@ def test_reload_colors(self, config): def test_reload_colorscheme(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['colorschemes/test/default']['groups']['str1']['bg'] = 'col3' add_watcher_events(p, 'colorschemes/test/default') @@ -266,24 +266,24 @@ def test_reload_colorscheme(self, config): def test_reload_theme(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['themes/test/default']['segments']['left'][0]['contents'] = 'col3' add_watcher_events(p, 'themes/test/default') self.assertEqual(p.render(), '<1 2 1> col3<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') self.assertEqual(p.logger._pop_msgs(), []) @with_new_config def test_reload_top_theme(self, config): with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') - config['themes/powerline']['dividers']['left']['hard'] = '|>' - add_watcher_events(p, 'themes/powerline') + config['themes/' + UT]['dividers']['left']['hard'] = '|>' + add_watcher_events(p, 'themes/' + UT) self.assertEqual(p.render(), '<1 2 1> s<2 4 False>|><3 4 4>g<4 False False>|>') - self.assertAccessEvents(p, 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') self.assertEqual(p.logger._pop_msgs(), []) @with_new_config @@ -291,12 +291,12 @@ def test_reload_theme_main(self, config): config['config']['common']['interval'] = None with get_powerline(config, run_once=False) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['themes/test/default']['segments']['left'][0]['contents'] = 'col3' add_watcher_events(p, 'themes/test/default', wait=False) self.assertEqual(p.render(), '<1 2 1> col3<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') self.assertEqual(p.logger._pop_msgs(), []) self.assertTrue(p._watcher._calls) @@ -305,7 +305,7 @@ def test_run_once_no_theme_reload(self, config): config['config']['common']['interval'] = None with get_powerline(config, run_once=True) as p: self.assertEqual(p.render(), '<1 2 1> s<2 4 False>>><3 4 4>g<4 False False>>>') - self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/powerline', 'check:themes/test/__main__') + self.assertAccessEvents(p, 'config', 'colors', 'check:colorschemes/default', 'check:colorschemes/test/__main__', 'colorschemes/test/default', 'themes/test/default', 'themes/' + UT, 'check:themes/test/__main__') config['themes/test/default']['segments']['left'][0]['contents'] = 'col3' add_watcher_events(p, 'themes/test/default', wait=False) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 3cd7d3874..56ca0c2b3 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -10,7 +10,7 @@ import tests.vim as vim_module from tests import TestCase -from tests.lib.config_mock import get_powerline, get_powerline_raw, swap_attributes +from tests.lib.config_mock import get_powerline, get_powerline_raw, swap_attributes, UT from tests.lib import Args, replace_item @@ -114,7 +114,7 @@ def highlighted_string(s, group, **kwargs): ], }, }, - 'themes/powerline': { + 'themes/' + UT: { 'dividers': { 'left': { 'hard': '>>', @@ -362,9 +362,9 @@ def test_no_main(self, p, config): @add_args def test_no_powerline(self, p, config): - config['themes/test/__main__']['dividers'] = config['themes/powerline']['dividers'] + config['themes/test/__main__']['dividers'] = config['themes/' + UT]['dividers'] config['themes/test/__main__']['spaces'] = 1 - del config['themes/powerline'] + del config['themes/' + UT] self.assertRenderEqual(p, '{121} s {24}>>{344}g {34}>{34}<{344} f {--}') self.assertEqual(p.logger._pop_msgs(), []) @@ -380,19 +380,19 @@ def test_no_default(self, p, config): @add_args def test_only_default(self, p, config): - config['themes/test/default']['dividers'] = config['themes/powerline']['dividers'] + config['themes/test/default']['dividers'] = config['themes/' + UT]['dividers'] config['themes/test/default']['spaces'] = 1 del config['themes/test/__main__'] - del config['themes/powerline'] + del config['themes/' + UT] self.assertRenderEqual(p, '{121} s {24}>>{344}g {34}>{34}<{344} f {--}') @add_args def test_only_main(self, p, config): del config['themes/test/default'] - del config['themes/powerline'] + del config['themes/' + UT] self.assertRenderEqual(p, 'themes/test/default') self.assertEqual(p.logger._pop_msgs(), [ - 'exception:test:powerline:Failed to load theme: themes/powerline', + 'exception:test:powerline:Failed to load theme: themes/' + UT, 'exception:test:powerline:Failed to load theme: themes/test/default', 'exception:test:powerline:Failed to create renderer: themes/test/default', 'exception:test:powerline:Failed to render: themes/test/default', @@ -413,11 +413,11 @@ def test_only_powerline(self, p, config): @add_args def test_nothing(self, p, config): del config['themes/test/default'] - del config['themes/powerline'] + del config['themes/' + UT] del config['themes/test/__main__'] self.assertRenderEqual(p, 'themes/test/default') self.assertEqual(p.logger._pop_msgs(), [ - 'exception:test:powerline:Failed to load theme: themes/powerline', + 'exception:test:powerline:Failed to load theme: themes/' + UT, 'exception:test:powerline:Failed to load theme: themes/test/__main__', 'exception:test:powerline:Failed to load theme: themes/test/default', 'exception:test:powerline:Failed to create renderer: themes/test/default', @@ -570,7 +570,7 @@ def test_segment_datas(self, p, config): def m1(divider=',', **kwargs): return divider.join(kwargs.keys()) + divider m1.powerline_segment_datas = { - 'powerline': { + UT: { 'args': { 'divider': ';' } @@ -640,7 +640,7 @@ def m1(**kwargs): def m2(**kwargs): return 'S' sys.modules['bar'] = Args(m1=m1, m2=m2) - config['themes/powerline']['segment_data'] = { + config['themes/' + UT]['segment_data'] = { 'm1': { 'before': '1' }, From 64d96c833e8bef9c519435ac98483955294f86b0 Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 29 Oct 2016 19:00:59 +0300 Subject: [PATCH 12/18] Fix shell tests --- tests/test_shells/bash.daemon.ok | 56 ++++++++++----------- tests/test_shells/bash.nodaemon.ok | 56 ++++++++++----------- tests/test_shells/busybox.daemon.ok | 42 ++++++++-------- tests/test_shells/busybox.nodaemon.ok | 42 ++++++++-------- tests/test_shells/dash.daemon.ok | 40 +++++++-------- tests/test_shells/dash.nodaemon.ok | 40 +++++++-------- tests/test_shells/fish.ok | 54 ++++++++++----------- tests/test_shells/mksh.daemon.ok | 44 ++++++++--------- tests/test_shells/mksh.nodaemon.ok | 44 ++++++++--------- tests/test_shells/rc.daemon.ok | 40 +++++++-------- tests/test_shells/rc.nodaemon.ok | 40 +++++++-------- tests/test_shells/tcsh.ok | 34 ++++++------- tests/test_shells/zsh.daemon.ok | 70 +++++++++++++-------------- tests/test_shells/zsh.nodaemon.ok | 70 +++++++++++++-------------- tests/test_shells/zsh.zpython.ok | 56 ++++++++++----------- 15 files changed, 364 insertions(+), 364 deletions(-) diff --git a/tests/test_shells/bash.daemon.ok b/tests/test_shells/bash.daemon.ok index 4f25eb13f..50d7d212e 100644 --- a/tests/test_shells/bash.daemon.ok +++ b/tests/test_shells/bash.daemon.ok @@ -1,15 +1,15 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '                                      abc                                      def                                      ' @@ -17,25 +17,25 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_LEFT" -  BRANCH  ⋯  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_LEFT" +  BRANCH  …  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo  foo   -  BRANCH  ⋯  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_FULL" +  BRANCH  …  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_FULL"                                                                                                                                                                                                                                                                                                              -  BRANCH  ⋯  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo +  BRANCH  …  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo                                                                                                                                                                                                                                                                                                        foo  -  BRANCH  ⋯  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR +  BRANCH  …  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR                                                                                                                                                                                                                                                                                                              -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/bash.nodaemon.ok b/tests/test_shells/bash.nodaemon.ok index 9bfc9cfeb..9571a21ca 100644 --- a/tests/test_shells/bash.nodaemon.ok +++ b/tests/test_shells/bash.nodaemon.ok @@ -1,15 +1,15 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '    abc    def    ' @@ -17,25 +17,25 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_LEFT" -  BRANCH  ⋯  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_LEFT" +  BRANCH  …  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo  foo   -  BRANCH  ⋯  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_FULL" +  BRANCH  …  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above "$ABOVE_FULL"                                                                                                                                                                                                                                                                                                              -  BRANCH  ⋯  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo +  BRANCH  …  shell  3rd  «Unicode!»  export DISPLAYED_ENV_VAR=foo                                                                                                                                                                                                                                                                                                        foo  -  BRANCH  ⋯  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR +  BRANCH  …  shell  3rd  «Unicode!»  unset DISPLAYED_ENV_VAR                                                                                                                                                                                                                                                                                                              -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segments.above +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/busybox.daemon.ok b/tests/test_shells/busybox.daemon.ok index 0230f4dec..a8c3faa5e 100644 --- a/tests/test_shells/busybox.daemon.ok +++ b/tests/test_shells/busybox.daemon.ok @@ -1,14 +1,14 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '                                      abc                                      def                                      ' @@ -16,14 +16,14 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/busybox.nodaemon.ok b/tests/test_shells/busybox.nodaemon.ok index fa4854012..00b8b7ccd 100644 --- a/tests/test_shells/busybox.nodaemon.ok +++ b/tests/test_shells/busybox.nodaemon.ok @@ -1,14 +1,14 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '    abc    def    ' @@ -16,14 +16,14 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/dash.daemon.ok b/tests/test_shells/dash.daemon.ok index 042665d8b..bfe8fab0c 100644 --- a/tests/test_shells/dash.daemon.ok +++ b/tests/test_shells/dash.daemon.ok @@ -1,13 +1,13 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s set_theme_option default_leftonly.segment_data.hostname.display false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1   USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1   USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '                                      abc                                      def                                      ' @@ -15,14 +15,14 @@ set_theme_option default_leftonly.segment_data.hostname.display false abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/dash.nodaemon.ok b/tests/test_shells/dash.nodaemon.ok index bac163c15..c4f8e567d 100644 --- a/tests/test_shells/dash.nodaemon.ok +++ b/tests/test_shells/dash.nodaemon.ok @@ -1,13 +1,13 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s set_theme_option default_leftonly.segment_data.hostname.display false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1   USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1   USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo '    abc    def    ' @@ -15,14 +15,14 @@ set_theme_option default_leftonly.segment_data.hostname.display false abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/fish.ok b/tests/test_shells/fish.ok index e10444508..973cf05ac 100644 --- a/tests/test_shells/fish.ok +++ b/tests/test_shells/fish.ok @@ -1,52 +1,52 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»   - USER  ⋯  shell  3rd  «Unicode!»   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m   +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H   +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]   +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%   +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]   +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)   +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)   +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`   +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»   + USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH     BRANCH  - USER  ⋯  shell  3rd  «Unicode!»   + USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH     BRANCH   foo   - USER  ⋯  shell  3rd  «Unicode!»   + USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH     BRANCH                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    foo                                                                                                                                                                                                                                                                                                              - USER  ⋯  shell  3rd  «Unicode!»   + USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH     BRANCH  - INSERT  USER  ⋯  shell  3rd  «Unicode!»   + INSERT  USER  …  shell  3rd  «Unicode!»      BRANCH  - DEFAULT  USER  ⋯  shell  3rd  «Unicode!»   + DEFAULT  USER  …  shell  3rd  «Unicode!»      BRANCH  - INSERT  USER  ⋯  shell  3rd  «Unicode!»   + INSERT  USER  …  shell  3rd  «Unicode!»      BRANCH  - DEFAULT  USER  ⋯  shell  3rd  «Unicode!»   + DEFAULT  USER  …  shell  3rd  «Unicode!»      BRANCH  - INSERT  USER  ⋯  shell  3rd  «Unicode!»   + INSERT  USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH  - INSERT  USER  ⋯  shell  3rd  «Unicode!»   + INSERT  USER  …  shell  3rd  «Unicode!»      BRANCH     BRANCH     BRANCH  diff --git a/tests/test_shells/mksh.daemon.ok b/tests/test_shells/mksh.daemon.ok index 3619f4221..2a367dcf1 100644 --- a/tests/test_shells/mksh.daemon.ok +++ b/tests/test_shells/mksh.daemon.ok @@ -1,17 +1,17 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 [1] + Terminated bash -c ... -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo -n -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo -n +  BRANCH  …  tests  shell  3rd  echo '                                      abc                                      def                                      ' @@ -19,14 +19,14 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/mksh.nodaemon.ok b/tests/test_shells/mksh.nodaemon.ok index 754633ab1..09190f8d1 100644 --- a/tests/test_shells/mksh.nodaemon.ok +++ b/tests/test_shells/mksh.nodaemon.ok @@ -1,17 +1,17 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1 [1] + Terminated bash -c ... -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  tests  shell  3rd  echo -n -  BRANCH  ⋯  tests  shell  3rd  echo ' +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  tests  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  tests  shell  3rd  echo -n +  BRANCH  …  tests  shell  3rd  echo '    abc    def    ' @@ -19,14 +19,14 @@ abc def -  BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC -  BRANCH $ABC⋯  shell  3rd  «Unicode!» $ABCfalse +  BRANCH  …  tests  shell  3rd  cd "$DIR1" +  BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.dividers.left.hard \$ABC +  BRANCH $ABC…  shell  3rd  «Unicode!» $ABCfalse diff --git a/tests/test_shells/rc.daemon.ok b/tests/test_shells/rc.daemon.ok index e2914fa4e..9bbee8451 100644 --- a/tests/test_shells/rc.daemon.ok +++ b/tests/test_shells/rc.daemon.ok @@ -1,24 +1,24 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV = '/home/foo/.virtenvs/some-virtual-environment' -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV = () -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV = '/home/foo/.virtenvs/some-virtual-environment' +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV = () +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `{cat pid} ; sleep 1s -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd $DIR1 -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../$DIR2 -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  false -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  1  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  shell  3rd  «Unicode!»  echo `{ +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `{cat pid} ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd $DIR1 +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m  cd ../$DIR2 +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  false +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  1  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  shell  3rd  «Unicode!»  echo `{                                            echo Continuation!                                           } Continuation! diff --git a/tests/test_shells/rc.nodaemon.ok b/tests/test_shells/rc.nodaemon.ok index fa6f22d5a..d45c7bd3f 100644 --- a/tests/test_shells/rc.nodaemon.ok +++ b/tests/test_shells/rc.nodaemon.ok @@ -1,24 +1,24 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV = '/home/foo/.virtenvs/some-virtual-environment' -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV = () -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV = '/home/foo/.virtenvs/some-virtual-environment' +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV = () +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `{cat pid} ; sleep 1s -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd $DIR1 -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../$DIR2 -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  false -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  1  set_theme_option default_leftonly.segment_data.hostname.display false - USER   BRANCH  ⋯  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segment_data.user.display false -  BRANCH  ⋯  shell  3rd  «Unicode!»  echo `{ +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `{cat pid} ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd $DIR1 +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m  cd ../$DIR2 +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  false +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  1  set_theme_option default_leftonly.segment_data.hostname.display false + USER   BRANCH  …  shell  3rd  «Unicode!»  set_theme_option default_leftonly.segment_data.user.display false +  BRANCH  …  shell  3rd  «Unicode!»  echo `{     echo Continuation!    } Continuation! diff --git a/tests/test_shells/tcsh.ok b/tests/test_shells/tcsh.ok index fd5d5914d..3b25f86fd 100644 --- a/tests/test_shells/tcsh.ok +++ b/tests/test_shells/tcsh.ok @@ -1,17 +1,17 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1   -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`   -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1   +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m   +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H   +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]   +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%   +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]   +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)   +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)   +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`   +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»   diff --git a/tests/test_shells/zsh.daemon.ok b/tests/test_shells/zsh.daemon.ok index ae8682e48..bea39b96f 100644 --- a/tests/test_shells/zsh.daemon.ok +++ b/tests/test_shells/zsh.daemon.ok @@ -1,32 +1,32 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd "$DIR1" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bindkey -v ; set_theme default + INSERT   HOSTNAME  USER  …  tests  shell  3rd   COMMND   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd  echo abc abc - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false - INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false - INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl + INSERT   HOSTNAME  USER  …  tests  shell  3rd  false + INSERT   HOSTNAME  USER  …  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false + INSERT  USER  …  tests  shell  3rd  set_theme_option default.segment_data.user.display false + INSERT  …  tests  shell  3rd  select abc in def ghi jkl  select                            do  select                             echo $abc  select                             break @@ -34,19 +34,19 @@ abc 1) def 2) ghi 3) jkl                    Select variant  1 def - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" + INSERT  …  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo  foo   - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" + INSERT  …  tests  shell  3rd  unset DISPLAYED_ENV_VAR + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL"                                                                                                                                                                                                                                                                                                             - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo + INSERT  …  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo                                                                                                                                                                                                                                                                                                       foo  - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR + INSERT  …  tests  shell  3rd  unset DISPLAYED_ENV_VAR                                                                                                                                                                                                                                                                                                             - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above - INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above + INSERT  …  tests  shell  3rd  hash -d foo=$PWD:h ; cd .  INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC  INSERT $ABC~foo  3rd $ABCtrue diff --git a/tests/test_shells/zsh.nodaemon.ok b/tests/test_shells/zsh.nodaemon.ok index ce35d9529..d6f4d5189 100644 --- a/tests/test_shells/zsh.nodaemon.ok +++ b/tests/test_shells/zsh.nodaemon.ok @@ -1,32 +1,32 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd "$DIR1" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bindkey -v ; set_theme default + INSERT   HOSTNAME  USER  …  tests  shell  3rd   COMMND   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd  echo abc abc - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false - INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false - INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl + INSERT   HOSTNAME  USER  …  tests  shell  3rd  false + INSERT   HOSTNAME  USER  …  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false + INSERT  USER  …  tests  shell  3rd  set_theme_option default.segment_data.user.display false + INSERT  …  tests  shell  3rd  select abc in def ghi jkl  select  do  select   echo $abc  select   break @@ -34,19 +34,19 @@ abc 1) def 2) ghi 3) jkl  Select variant  1 def - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" + INSERT  …  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo  foo   - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" + INSERT  …  tests  shell  3rd  unset DISPLAYED_ENV_VAR + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL"                                                                                                                                                                                                                                                                                                             - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo + INSERT  …  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo                                                                                                                                                                                                                                                                                                       foo  - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR + INSERT  …  tests  shell  3rd  unset DISPLAYED_ENV_VAR                                                                                                                                                                                                                                                                                                             - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above - INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . + INSERT  …  tests  shell  3rd  set_theme_option default.segments.above + INSERT  …  tests  shell  3rd  hash -d foo=$PWD:h ; cd .  INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC  INSERT $ABC~foo  3rd $ABCtrue diff --git a/tests/test_shells/zsh.zpython.ok b/tests/test_shells/zsh.zpython.ok index 53ff5b4c1..b19cf390d 100644 --- a/tests/test_shells/zsh.zpython.ok +++ b/tests/test_shells/zsh.zpython.ok @@ -1,32 +1,32 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bgscript.sh -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  cd "$DIR1" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^[[32m  cd ../"$DIR2" +  HOSTNAME  USER   BRANCH  …  shell  3rd  ^H  cd ../'\[\]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  \[\]  cd ../'%%' +  HOSTNAME  USER   BRANCH  …  shell  3rd  %%  cd ../'#[bold]' +  HOSTNAME  USER   BRANCH  …  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  …  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  …  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  …  shell  3rd  «Unicode!»  cd .. +  HOSTNAME  USER   BRANCH  …  tests  shell  3rd  bindkey -v ; set_theme default + INSERT   HOSTNAME  USER  …  tests  shell  3rd   COMMND   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd   + INSERT   HOSTNAME  USER  …  tests  shell  3rd  echo abc abc - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false - INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false - INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl + INSERT   HOSTNAME  USER  …  tests  shell  3rd  false + INSERT   HOSTNAME  USER  …  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false + INSERT  USER  …  tests  shell  3rd  set_theme_option default.segment_data.user.display false + INSERT  …  tests  shell  3rd  select abc in def ghi jkl  select                            do  select                             echo $abc  select                             break @@ -34,8 +34,8 @@ abc 1) def 2) ghi 3) jkl                    Select variant  1 def - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  cd . + INSERT  …  tests  shell  3rd  hash -d foo=$PWD:h ; cd .  INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC  INSERT $ABC~foo  3rd $ABCtrue From 6f32ca001ca4861cd66813facfb406fee11178c8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 1 Nov 2016 00:12:37 -0400 Subject: [PATCH 13/18] Use hglib instead of mercurial directly. This wrapper uses the command server without tying it to the mercurial internals, which means it can support Python 3 and use a more liberal license. --- docs/source/installation.rst | 8 ++++---- powerline/lib/vcs/mercurial.py | 26 ++++++++++++++------------ tests/test_lib.py | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 909efa5f6..c9a7db266 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -22,8 +22,8 @@ Generic requirements faster than python version of the client, but still slower than C version. * ``psutil`` python package. Required for some segments like cpu_percent. Some segments have linux-only fallbacks for ``psutil`` functionality. -* ``mercurial`` python package (note: *not* standalone executable). Required to - work with mercurial repositories. +* ``hglib`` python package *and* mercurial executable. Required to work with + mercurial repositories. * ``pygit2`` python package or ``git`` executable. Required to work with ``git`` repositories. * ``bzr`` python package (note: *not* standalone executable). Required to work @@ -35,8 +35,8 @@ Generic requirements :py:func:`powerline.listers.i3wm.output_lister`. .. note:: - Until mercurial and bazaar support Python-3 or PyPy powerline will not - support repository information when running in these interpreters. + Until bazaar supports Python-3 or PyPy powerline will not support + repository information when running in these interpreters. .. _repository-root: diff --git a/powerline/lib/vcs/mercurial.py b/powerline/lib/vcs/mercurial.py index 4a5413031..45c9c42b6 100644 --- a/powerline/lib/vcs/mercurial.py +++ b/powerline/lib/vcs/mercurial.py @@ -3,7 +3,7 @@ import os -from mercurial import hg, ui, match +import hglib from powerline.lib.vcs import get_branch_name, get_file_status from powerline.lib.path import join @@ -20,21 +20,23 @@ def branch_name_from_config_file(directory, config_file): class Repository(object): - __slots__ = ('directory', 'ui', 'create_watcher') + __slots__ = ('directory', 'create_watcher') - statuses = 'MARDUI' - repo_statuses = (1, 1, 1, 1, 2) + # hg status -> (powerline file status, repo status flag) + statuses = { + b'M': ('M', 1), b'A': ('A', 1), b'R': ('R', 1), b'!': ('D', 1), + b'?': ('U', 2), b'I': ('I', 0) + } repo_statuses_str = (None, 'D ', ' U', 'DU') def __init__(self, directory, create_watcher): self.directory = os.path.abspath(directory) - self.ui = ui.ui() self.create_watcher = create_watcher def _repo(self, directory): # Cannot create this object once and use always: when repository updates # functions emit invalid results - return hg.repository(self.ui, directory) + return hglib.open(directory) def status(self, path=None): '''Return status of repository or file. @@ -63,17 +65,17 @@ def status(self, path=None): def do_status(self, directory, path): repo = self._repo(directory) if path: - m = match.match(None, None, [path], exact=True) - statuses = repo.status(match=m, unknown=True, ignored=True) - for status, paths in zip(self.statuses, statuses): + path = os.path.join(directory, path) + statuses = repo.status(include=path, all=True) + for status, paths in statuses: if paths: - return status + return self.statuses[status][0] return None else: resulting_status = 0 - for status, paths in zip(self.repo_statuses, repo.status(unknown=True)): + for status, paths in repo.status(all=True): if paths: - resulting_status |= status + resulting_status |= self.statuses[status][1] return self.repo_statuses_str[resulting_status] def branch(self): diff --git a/tests/test_lib.py b/tests/test_lib.py index 799fc2721..f35f231ca 100644 --- a/tests/test_lib.py +++ b/tests/test_lib.py @@ -33,7 +33,7 @@ use_bzr = True try: - __import__('mercurial') + __import__('hglib') except ImportError: use_mercurial = False else: From 51fabca257b6cbf1d56b75a35b275a2b57a2802c Mon Sep 17 00:00:00 2001 From: YangBy Date: Thu, 1 Dec 2016 12:58:30 +0800 Subject: [PATCH 14/18] Fix filenames for linux power supply class in battery segment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both "charge" (µAh) and "energy" (µWh) represents "capacity" of battery in linux. More details can find here: https://github.com/torvalds/linux/blob/master/Documentation/power/power_supply_class.txt Fixes #1605. --- powerline/segments/common/bat.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/powerline/segments/common/bat.py b/powerline/segments/common/bat.py index a0b892450..458a85675 100644 --- a/powerline/segments/common/bat.py +++ b/powerline/segments/common/bat.py @@ -77,25 +77,31 @@ def _flatten_battery(pl): pl.debug('Not using DBUS+UPower as no batteries were found') if os.path.isdir('/sys/class/power_supply'): - linux_energy_full_fmt = '/sys/class/power_supply/{0}/energy_full' - linux_energy_fmt = '/sys/class/power_supply/{0}/energy_now' + # ENERGY_* attributes represents capacity in µWh only. + # CHARGE_* attributes represents capacity in µAh only. + linux_capacity_units = ('energy', 'charge') + linux_energy_full_fmt = '/sys/class/power_supply/{0}/{1}_full' + linux_energy_fmt = '/sys/class/power_supply/{0}/{1}_now' linux_status_fmt = '/sys/class/power_supply/{0}/status' devices = [] for linux_supplier in os.listdir('/sys/class/power_supply'): - energy_path = linux_energy_fmt.format(linux_supplier) - if not os.path.exists(energy_path): - continue - pl.debug('Using /sys/class/power_supply with battery {0}', linux_supplier) - devices.append(linux_supplier) + for unit in linux_capacity_units: + energy_path = linux_energy_fmt.format(linux_supplier, unit) + if not os.path.exists(energy_path): + continue + pl.debug('Using /sys/class/power_supply with battery {0} and unit {1}', + linux_supplier, unit) + devices.append((linux_supplier, unit)) + break # energy or charge, not both if devices: def _get_battery_status(pl): energy = 0.0 energy_full = 0.0 state = True - for device in devices: - with open(linux_energy_full_fmt.format(device), 'r') as f: + for device, unit in devices: + with open(linux_energy_full_fmt.format(device, unit), 'r') as f: energy_full += int(float(f.readline().split()[0])) - with open(linux_energy_fmt.format(device), 'r') as f: + with open(linux_energy_fmt.format(device, unit), 'r') as f: energy += int(float(f.readline().split()[0])) try: with open(linux_status_fmt.format(device), 'r') as f: From 21ea62db56eaec619374e83e28458a86303d58de Mon Sep 17 00:00:00 2001 From: Foo Date: Wed, 14 Dec 2016 22:24:25 +0300 Subject: [PATCH 15/18] Move -- function command arguments after function name Fish 2.4.0-231-gd885f00 cannot handle current variant and fish 2.2.0 is still fine with new variant. --- powerline/bindings/fish/powerline-setup.fish | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/powerline/bindings/fish/powerline-setup.fish b/powerline/bindings/fish/powerline-setup.fish index f9539e7b1..0795e7032 100644 --- a/powerline/bindings/fish/powerline-setup.fish +++ b/powerline/bindings/fish/powerline-setup.fish @@ -33,14 +33,14 @@ function powerline-setup if test -z "$POWERLINE_COMMAND" set -g POWERLINE_COMMAND (env $POWERLINE_CONFIG_COMMAND shell command) end - function --on-variable fish_key_bindings _powerline_set_default_mode + function _powerline_set_default_mode --on-variable fish_key_bindings if test x$fish_key_bindings != xfish_vi_key_bindings set -g _POWERLINE_DEFAULT_MODE default else set -g -e _POWERLINE_DEFAULT_MODE end end - function --on-variable POWERLINE_COMMAND _powerline_update + function _powerline_update --on-variable POWERLINE_COMMAND set -l addargs "--last-exit-code=\$status" set -l addargs "$addargs --last-pipe-status=\$status" set -l addargs "$addargs --jobnum=(jobs -p | wc -l)" @@ -70,7 +70,7 @@ function powerline-setup env \$POWERLINE_COMMAND $POWERLINE_COMMAND_ARGS shell right $addargs $rpromptpast end - function --on-signal WINCH _powerline_set_columns + function _powerline_set_columns --on-signal WINCH set -g _POWERLINE_COLUMNS $columnsexpr end " @@ -94,10 +94,10 @@ function powerline-setup env TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_$argv[1]_(_powerline_tmux_pane) "$argv[2]" env TMUX="$_POWERLINE_TMUX" tmux refresh -S end - function --on-variable PWD _powerline_tmux_set_pwd + function _powerline_tmux_set_pwd --on-variable PWD _powerline_tmux_setenv PWD "$PWD" end - function --on-signal WINCH _powerline_tmux_set_columns + function _powerline_tmux_set_columns --on-signal WINCH _powerline_tmux_setenv COLUMNS (_powerline_columns) end _powerline_tmux_set_columns From 12bd79729e248ff0f966023f05342e1445a99542 Mon Sep 17 00:00:00 2001 From: Foo Date: Fri, 6 Jan 2017 21:23:42 +0300 Subject: [PATCH 16/18] Improve removing arguments from documentation Examples of issues where user used arguments which should not be present in documentation, but actually were present: #1699 (cpu_load_percent: shutdown_event), #1700 (weather: key, after_update, shutdown_event). --- powerline/lib/threaded.py | 23 ++++++++++++++--------- powerline/lint/inspect.py | 2 ++ powerline/segments/common/env.py | 2 +- powerline/segments/common/players.py | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/powerline/lib/threaded.py b/powerline/lib/threaded.py index 01ad2a0dc..e5a6b3e7c 100644 --- a/powerline/lib/threaded.py +++ b/powerline/lib/threaded.py @@ -158,17 +158,16 @@ def argspecobjs(self): def additional_args(self): return (('interval', self.interval),) + _omitted_args = { + 'render': (0,), + 'set_state': ('shutdown_event',), + } + def omitted_args(self, name, method): + ret = self._omitted_args.get(name, ()) if isinstance(getattr(self, name, None), MethodType): - omitted_indexes = (0,) - else: - omitted_indexes = () - if name.startswith('render'): - if omitted_indexes: - omitted_indexes += (1,) - else: - omitted_indexes = (0,) - return omitted_indexes + ret = tuple((i + 1 if isinstance(i, int) else i for i in ret)) + return ret class KwThreadedSegment(ThreadedSegment): @@ -255,3 +254,9 @@ def set_state(self, interval=None, update_first=True, shutdown_event=None, **kwa @staticmethod def render_one(update_state, **kwargs): return update_state + + _omitted_args = { + 'render': ('update_value', 'key', 'after_update'), + 'set_state': ('shutdown_event',), + 'render_one': (0,), + } diff --git a/powerline/lint/inspect.py b/powerline/lint/inspect.py index b6e0380bd..15bb6103b 100644 --- a/powerline/lint/inspect.py +++ b/powerline/lint/inspect.py @@ -39,7 +39,9 @@ def getconfigargspec(obj): for i, arg in enumerate(reversed(argspec.args)): if ( largs - (i + 1) in omitted_args + or arg in omitted_args or arg == 'pl' + or arg == 'self' or (arg == 'create_watcher' and requires_filesystem_watcher) or (arg == 'segment_info' and requires_segment_info) ): diff --git a/powerline/segments/common/env.py b/powerline/segments/common/env.py index ec28be7fa..e4a2428b8 100644 --- a/powerline/segments/common/env.py +++ b/powerline/segments/common/env.py @@ -44,7 +44,7 @@ def argspecobjs(self): def omitted_args(self, name, method): if method is self.get_shortened_path: - return (0, 1, 2) + return () else: return super(CwdSegment, self).omitted_args(name, method) diff --git a/powerline/segments/common/players.py b/powerline/segments/common/players.py index 333612cbf..32277a672 100644 --- a/powerline/segments/common/players.py +++ b/powerline/segments/common/players.py @@ -62,7 +62,7 @@ def argspecobjs(self): yield 'get_player_status', self.get_player_status def omitted_args(self, name, method): - return (0,) + return () _common_args = ''' From da4f5137f6c6f8f1239f8a5ad640e6a03a8f411f Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sat, 21 Jan 2017 18:57:59 -0500 Subject: [PATCH 17/18] Added note about laststatus Users may be confused when installing powerline as it does not appear by default in single-window mode. This change alerts users that they should not expect to see the status line and points them to the help documents for laststatus so that they can activate it in all cases if they want. --- docs/source/usage/other.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/usage/other.rst b/docs/source/usage/other.rst index 18d25d997..d77348417 100644 --- a/docs/source/usage/other.rst +++ b/docs/source/usage/other.rst @@ -17,6 +17,10 @@ If installed using pip just add (replace ``python`` with ``python3`` if appropriate) to the :file:`vimrc`. +.. note:: + Status line will not appear by default when there is only a single window + displayed. Run ``:h 'laststatus'`` in Vim for more information. + If the repository was just cloned the following line needs to be added to the :file:`vimrc`: From e578b8af27c7fb5bba0efd13e3f970f441f2c156 Mon Sep 17 00:00:00 2001 From: Foo Date: Sun, 5 Feb 2017 13:25:11 +0300 Subject: [PATCH 18/18] Update base version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 03a16a4b8..260deb884 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ def compile_client(): def get_version(): - base_version = '2.5' + base_version = '2.5.1' base_version += '.dev9999' try: return base_version + '+git.' + str(subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip())