Shell segments

powerline.segments.shell.continuation(renames={}, right_align=False, omit_cmdsubst=True)[source]

Display parser state.

Parameters:
  • omit_cmdsubst (bool) – Do not display cmdsubst parser state if it is the last one.
  • right_align (bool) – Align to the right.
  • renames (dict) – Rename states: {old_name : new_name}. If new_name is None then given state is not displayed.

Highlight groups used: continuation, continuation:current.

powerline.segments.shell.jobnum(show_zero=False)[source]

Return the number of jobs.

Parameters:show_zero (bool) – If False (default) shows nothing if there are no jobs. Otherwise shows zero for no jobs.
powerline.segments.shell.last_pipe_status()[source]

Return last pipe status.

Highlight groups used: exit_fail, exit_success

powerline.segments.shell.last_status()[source]

Return last exit code.

Highlight groups used: exit_fail

powerline.segments.shell.mode(default=None, override={'vicmd': 'COMMND', 'viins': 'INSERT'})[source]

Return the current mode.

Parameters:
  • override (dict) – dict for overriding mode strings.
  • default (str) – If current mode is equal to this string then this segment will not get displayed. If not specified the value is taken from $POWERLINE_DEFAULT_MODE variable. This variable is set by zsh bindings for any mode that does not start from vi.

Previous topic

Common segments

Next topic

Vim segments

This Page