powerline/tests/test_shells/outputs/bash.nodaemon.ok
Cédric Schieli c31f83f831
Emulate a right prompt in bash (#2148)
* Allow passing args from render() to hl() and hlstyle() functions

* New escape arg in ShellRenderer's hlstyle() to enable/disable escaping

* Fix invalid escape sequence

* Emulate a right prompt in bash

Fixes #2103

* Document the new hl_args argument
2021-01-06 18:20:15 +09:00

14 KiB

  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd  cd .git
  HOSTNAME  USER   BRANCH  …  shell  3rd  .git  cd ..
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd  VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"
  HOSTNAME  USER  (e) some-virtual-environment   BRANCH  …  tmp  shell  3rd  VIRTUAL_ENV=
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd  bgscript.sh & waitpid.sh
[1] PID
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd   false
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd    kill `cat pid` ; sleep 1s
[1]+ Terminated bgscript.sh
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd  set_theme_option default.segment_data.hostname.display false
  HOSTNAME  USER   BRANCH  …  tmp  shell  3rd  set_theme_option default_leftonly.segment_data.hostname.display false
 USER   BRANCH  …  tmp  shell  3rd  set_theme_option default.segment_data.user.display false
 USER   BRANCH  …  tmp  shell  3rd  set_theme_option default_leftonly.segment_data.user.display false
  BRANCH  …  tmp  shell  3rd  echo '
   abc
   def
   '
 
abc
def
 
  BRANCH  …  tmp  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!»  (exit 42)|(exit 43)
  BRANCH  …  shell  3rd  «Unicode!»  42  43  set_theme default
 …  shell  3rd  «Unicode!»  [s    BRANCH [uset_theme_option default.segments.above "$ABOVE_LEFT"
 …  shell  3rd  «Unicode!»  [s    BRANCH [uexport DISPLAYED_ENV_VAR=foo
 foo  
 …  shell  3rd  «Unicode!»  [s    BRANCH [uunset DISPLAYED_ENV_VAR
 …  shell  3rd  «Unicode!»  [s    BRANCH [uset_theme_option default.segments.above "$ABOVE_FULL"
                                                                                                                                                                                                                                                                                                            
 …  shell  3rd  «Unicode!»  [s    BRANCH [uexport DISPLAYED_ENV_VAR=foo
                                                                                                                                                                                                                                                                                                       foo 
 …  shell  3rd  «Unicode!»  [s    BRANCH [uunset DISPLAYED_ENV_VAR
                                                                                                                                                                                                                                                                                                            
 …  shell  3rd  «Unicode!»  [s    BRANCH [uset_theme_option default.segments.above
 …  shell  3rd  «Unicode!»  [s    BRANCH [uset_theme_option default.dividers.left.hard \$ABC
 …  shell  3rd  «Unicode!» $ABC[s    BRANCH [ufalse