* fix(nodejs): update format string
* test(nodejs): adjust tests to new format strings
* fix(nodejs): use once_cell's Lazy to implement hassleless lazy execution
* chore(nodejs): run rustfmt
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
* perf(dart): evaluate version lazily
* fix(dart): update format string
* fix: use suggested format string
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
* perf(java): evaluate version lazily
* fix(java): update format string
* fix: use suggested format string
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
* perf(elm): evaluate version lazily
* fix(elm): update format string
* fix: use suggested format string
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
* fix(dotnet): update dotnet format string
* fix(dotnet): update erlang format string
* fix(dotnet): update golang format string
* fix(dotnet): update helm format string
* fix(dotnet): update julia format string
* fix(dotnet): update nim format string
* fix(dotnet): update ruby format string
* fix(dotnet): update rust format string
* test: update formatted strings in unit tests
* Use suggested format strings
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* perf(python): evaluate version lazily
* fix(python): update format string
* fix: use suggested format strings
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* perf(crystal): Lazily evaluate version command
This updates the module to lazily execute the `crystal --version`
command only when the `version` variable is used in the format string.
* perf(crystal): Update format string
Update format string to handle the `$version` variable not being set.
Update the python module to try multiple python binaries when
determining the version. With the new logic if starship doesn't find
`python` on the `PATH`, which is the default for some Linux Distros, it
will fallback to `python3` and then `python2`.
* feat(git_branch): add remote branch name if different than local branch
* feat(git_branch): Implement a more customizable remote branch
* feat(git_branch): Use more explicit API function name
* feat(git_branch): Remove forgotten draft documentation
* feat(git_branch): Set less verbose defaults
* feat(git_branch): Handle case to always display remote
* feat(git_branch): Fix error in rebase operation
* feat(git_branch): add 'only_attached' config bool
This adds a new boolean, `only_attached`, to the configuration for
the `git_branch` module. This mirrors the `only_detached` config
value for the `git_commit` module: setting the value to true causes
the module to suppress its output when the user is not on a branch.
This allows users to have either a branch name or a commit hash in
their prompt, as opposed to having either a branch name or the
overly-wordy "HEAD (sha1)".
* Fix formatting
This creates a custom logger for the log crate which logs everything to a file (/tmp/starship/session_$STARSHIP_SESSION_KEY.log) and it logs everything above Warn to stderr, but only if the log file does not contain the line that should be logged resulting in an error or warning to be only logged at the first starship invocation after opening the shell.
* add the exit code module
this allows to display more precisely the last command exit code
and to configure starship to not change the last charcter of the
prompt even in case of failure. It is disabled by default, because
it seems a bit redundant with the character module in its default
configuration.
* rename exit_code module to status
* Enforce a default disabled=true
In the outer places, we only check for the disabled flag in the config toml file, only when this is loaded into the real config struct, we see the default. And if the default is true, we have to abort at that place. For status and hg_branch that wasn't so. I also commented the rest
* fix spaces in markdown table for status module
* Add a tip that status module is disabled by default
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* Remove unrelated changes for default disabled=true
Co-authored-by: Gaëtan Lehmann <gaetan.lehmann@gmail.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Have restored the `pyenv_prefix` option to the python module. This is
added as a new variable that will only be shown if `pyenv` is being used
to determine the version of python that is being used.
Previously, all modules would have prefixes, which lead to the first
module having a dangling prefix. This change ensures that the first
few modules would instead have suffixes so that we don't start or
end with a prefix or suffix.
Often it is handy to get notified when the execution of a command finished.
This commit includes notify-rust in order to generate a desktop notification
when a command execution finished.
* initial commit of support for shlvl
* documentation for shlvl
* use a symbol instead
* test coverage for shlvl
* actually disable when the config says to
* fix docs
* tweak defaults some
* refactor from pr comments
* redisable
* return early to avoid indenting
* make default suffix empty space
* fixing tests after suffix change
* updating docs for format
* making shlvl compatible with formatting
* adding variables table for shlvl
* removing extra line
* doc clarity
Given how slow the Haskell module is (#1240), it is slowing down the entire prompt
from rendering when the module is active. This commit removes the module until we
can find a faster way to retreive the Haskell version.