This PR fixes the runtime error that displays this:
```log
prompt_status:2: symbols: attempt to assign array value to non-array
```.
It trips over a local array which is not properly declared.
* theme/fino: Check rvm-prompt is installed before to try to use it
Signed-off-by: Nick Diego Yamane <nick.diego@gmail.com>
* theme/fino-time: Check rvm-prompt is installed before to try to use it
Signed-off-by: Nick Diego Yamane <nick.diego@gmail.com>
Checking if the terminal supports 256 colors is better suited for
our purpose. Checking if `$DISPLAY` is set doesn't tell us if our
colors will be displayed correctly.
* agnoster: do not hardcode black foreground.
This would allow easy customization when using light color schemes, like
solarized-light
* agnoster: implement light theme variant
Use same variable as in blinks theme, to detect if solarized theme used
is a light or dark one.
The PROMPT building method clashes with other themes and
plugins that modify the PROMPT variable.
Also reverted the $jobstates trick due to it not working
inside $PROMPT.
* agnoster: improve perf with use of $jobstates (zsh/parameter module)
This saves multiple fork/execs (for the subshell and wc) each
time the prompt is rendered
* agnoster: compute git repo_path only when in a git repo
this avoids needlessly invoking git twice every time we render the prompt
* agnoster: avoid subshell when rendering prompt
Rather than forking a subshell to print the prompt, construct it
incrementally by appending to $PROMPT.
v2: fix incorrect CURRENT_BG
v3: fix bzr and hg prompting
Thanks @mcornella for the help.
* Make steef much faster by not printing all history each time
* Use whence -c to expand shell functions as well
* Use $2 (expanded command about to be ran)
* [rkj-repos] Make `hg prompt` check less strict
Move the `hg prompt` check inside the hg_prompt_info function so that
it returns an empty string if hg-prompt isn't installed.
Fixes#6743.
* [rkj-repos] Check for hg in `hg prompt` function
The whitespace in line 13 creates a double whitespace when combined with line 24. Therefore 2 whitespaces appear between ${user_host} and ${current_dir}.
Plugin command-not-found on Arch Linux returns 0 if git or bzr is found in repos, hence outputting unwanted pkgfile output.
Checking if the commands exist first fixes all such issues.
the agnoster theme is now able to render basic information
if the user is currently residing inside a bazaar folder.
if so, it will render a green promt segment with "bzr" and
the current revision number in it. if there are untracked
files, the bar will be rendered in yellow. if there are
changes to already tracked files, a + character will be
printed.