* style(init): Cleanup the unknown shell message
Have make a small change to the message that is printed when an unknow
shell is used. This correct the placement of the trailing `"` so that
the two training new lines are correctly printed and updates the list of
supported shells.
* refactor(init): consolidate unknown shell errors
Have consolidated the two unknown shell errors
* refactor(init): Quote the shell name in the output
Quote the shell name in the script and combined the shell_name and
shell_basename to simplify the code a little.
Previously attempting to use conditional format strings with
`$indicator` would never display an indicator, e.g.:
```toml
[shell]
fish_indicator = ""
bash_indicator = "B "
format = "($indicator )"
disabled = false
```
This would always display an empty string.
Fixes #2474.
* refactor(dotnet): ".NET" instead of "•NET"
"•NET" looks quite weird, especially since the official writing is ".NET".
* revert(docs): translated docs
Co-authored-by: Eyal Cherevatzki <eyal@hyperguest.com>
No need to forcefully set the `PROMPT` variable every time the prompt is
to be shown. Just set it once, leaving the command to be evaluated every
time the prompt is to be shown, by enabling the `promptsubst` option.
Setting it once is also friendlier to users that want to experiment with
another prompt theme by temporarily setting `PROMPT` to something else.
This would currently not be possible, because the variable is always
reset before every prompt draw (precmd) and keymap change
(zle-keymap-select).
Some other updates to take better advantage of the zsh script dialect:
* `$` is not required to read variables inside `(( ))` arithmetic
expressions.
* The zsh dialect to check if a variable is set is `${+var}`. Better
than `${var+1}`, which substitutes 1 if var is set, which is
intended for more general substitutions, not just to check if var is
set.
* The number of jobs can be read using the `%j` escape sequence, which
is expanded when the `promptpercent` option is set.
Also simplified a couple of code lines by avoiding a temporary
`STARSHIP_START_TIME` variable, since we already have
`STARSHIP_CAPTURED_TIME`.
* fix(python): Handle PyPy python version correctly
* refactor: rework Python version retrieval and formatting
Align Python version retrieval and formatting with established
Starship conventions.
* fix(java): use consistent separators for java path
This switches us from just appending `/bin/java` to `$JAVA_HOME` to
treating `$JAVA_HOME` as a path. This should fix any issues on Windows
where $JAVA_HOME might use `\` rather than `/`.
* test(java): add test for JAVA_HOME
* refactor: remove duplicate defaults
* perf: sligntly better java path perf
* Update src/modules/java.rs
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Update src/modules/java.rs
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* Update src/modules/java.rs
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
Co-authored-by: Dario Vladović <d.vladimyr@gmail.com>
* feat: add support for tcsh
* add tcsh to install.sh install message
* list tcsh in bug_report.rs and main.rs
* quote starship path
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* fix job count
* add tcsh support to shell module
* fix STARSHIP_START_TIME undefined error
* preserve existing user precmd and postcmd, remove jobs support
* remove unnecessary parentheses
* minor script improvement
* removes parens from install script message
* Update docs/config/README.md
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
The unicode hexagon symbol does not actually fit into a single column with a
fixed-width font. does. As starship requires a nerd font as a prerequisite,
it's safe to assume that this symbol is available.
Symbol link: https://www.nerdfonts.com/cheat-sheet?set=nf-mdi-nodejs
In the documentation, I've left the '⬢' symbols in '#### Text Group' as
they are, as they will continue displaying correctly in a browser
without a nerd font available. I feel like readability is more important
than consistency with the new nodejs symbol, especially as this
documentation section does not actually refer to nodejs, rather it's
just a symbol.
As `⬢` has been replaced, use `⌘` instead in documentation to avoid
any possible confusion
This makes it possible to configure when the purescript module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the php module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the perl module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the ocaml module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the nodejs module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the nim module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
* feat(erlang): Configure when the module is shown
This makes it possible to configure when the erlang module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
* Update docs/config/README.md
Co-authored-by: Shu Kutsuzawa <cappyzawa@gmail.com>
Co-authored-by: Shu Kutsuzawa <cappyzawa@gmail.com>
This makes it possible to configure when the elm module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the elixir module is shown
based on the contents of a directory. This should make it possible to be
a lot more granular when configuring the module.
* Add the shell module
This module allows to quickly identify which shell is currently used, in case someone frequently switches between them.
* Updated documentation with shell module.
Co-authored-by: mro <mro@fedorabox.localdomain>
This makes it possible to configure when the dotnet module is shown
based on the contents of a directory. This should make it possible to be
a lot more granular when configuring the module.
This makes it possible to configure when the lua module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the golang module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This makes it possible to configure when the terraform module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
* feat(docker_context): Configure when module is shown
This makes it possible to configure when the docker_context module is
shown based on the contents of a directory. This should make it possible
to be a lot more granular when configuring the module.
* Update docs/config/README.md
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
* feat(vagrant): Configure when the module is shown
This makes it possible to configure when the vagrant module is shown based on the contents of a directory.
* fix documentation
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
* feat(dart): Configure when the module is shown
This makes it possible to configure when the dart module is shown based
on the contents of a directory. This should make it possible to be a lot
more granular when configuring the module.
* docs(dart): add missing detected files
* removed invalid comment