1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-15 17:47:13 +00:00
Commit Graph

556 Commits

Author SHA1 Message Date
Caleb Maclennan
f13e44c730
feat(vcsh): Add new module for VCSH (#2513)
* feat(vcsh): Implement new VCSH module

* test(vcsh): Add unit tests for VCSH module

* docs(vcsh): Document VCSH module
2021-03-28 17:48:15 +02:00
Dario Vladović
404b4f3d0c
refactor(username): reformat code to match docs (#2517) 2021-03-27 22:13:20 +01:00
Dario Vladović
1336944ab7
refactor(singularity): use ? operator (#2518) 2021-03-27 18:53:54 +01:00
David Knaack
cf68f54611
fix(context): remove unwrap when pwd is unavailable (#2520) 2021-03-27 11:46:05 -04:00
Dario Vladović
c8a787475c
refactor: use unwrap_or_default (#2516) 2021-03-26 21:01:20 +01:00
Thomas O'Donnell
e0da57df3f
style(init): Cleanup the unknown shell message (#2444)
* 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.
2021-03-25 15:08:28 -05:00
David Knaack
ba40ad5ce6
chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
Chris Rose
aa7a8056bb
fix: Add a missing ' ' to the end of the python prompt (#2248)
Co-authored-by: Chris Rose <offline@offby1.net>
2021-03-24 10:41:08 -05:00
Andy Freeland
3513aae3ed
fix(shell): Support conditional format strings for $indicator (#2489)
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.
2021-03-23 17:20:29 -04:00
Zachary Dodge
0a091bd236
perf(git_status): replace git2 in git status module with git cli (#2465) 2021-03-23 12:45:27 -04:00
Eyal Cherevatzki
612cc7d27b
refactor(dotnet): ".NET" instead of "•NET" (#2471)
* 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>
2021-03-18 18:46:54 +01:00
David Knaack
052b56fe10
refactor: replace RootModuleConfig with Default (#2458) 2021-03-15 11:40:52 +01:00
Eric Nielsen
6fd7d7b501
fix(zsh): Set PROMPT just once (#2428)
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`.
2021-03-15 11:39:35 +01:00
Melroy van den Berg
c91b293c9d
fix(cmake): Change cmake symbol to unicode triangle (#2456) 2021-03-15 11:27:54 +01:00
Beni Ben zikry
dd5c62791c
feat(scala): Add scala module (#2409)
* Add support for scala ( w/o sbt )

* Add scala description

* Change scala color to bold red

* update scala extensions in README

* failed lint

* cr changes ( regex, simplify parsing, imports )

* Scala readme punctuation

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-03-14 20:37:00 +01:00
Asger Hautop Drewsen
d2946ddff7
fix(python): Handle PyPy python version correctly (#2374)
* fix(python): Handle PyPy python version correctly

* refactor: rework Python version retrieval and formatting

Align Python version retrieval and formatting with established
Starship conventions.
2021-03-14 19:27:19 +01:00
Thomas O'Donnell
50bc5d9134
fix(java): use consistent separators for java path (#2455)
* 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>
2021-03-13 17:09:40 +01:00
nils måsén
e5cdd9c1b3
feat(aws): add support for getting profile from awsu (#2451) 2021-03-13 09:35:50 +01:00
Bao, Huang-Huang
8f46dff9dc
fix(package): fix meson version extraction if 'meson_version' is present (#2397) 2021-03-12 15:30:25 +01:00
Eric Nielsen
fb6cefa4b5
style(aws): Add spacing between profile and region (#2417)
and also after the symbol when using the Nerd font glyph.
2021-03-06 20:47:06 +01:00
David Knaack
7385dc27a9
fix(bash): escape interpretable characters (#2404)
* fix(bash): escape interpretable characters

* also escape backticks
2021-03-05 01:47:07 -06:00
Vivek Malneedi
d21400a478
feat: add support for tcsh (#2288)
* 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>
2021-02-27 19:55:27 +01:00
whi-tw
4d3a4f230d
fix(nodejs): Change symbol to nerd-font (#1649)
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
2021-02-22 14:10:36 -06:00
Thomas O'Donnell
0083e28827
feat(helm): Configure when the module is shown (#2352)
This makes it possible to configure when the helm module is shown based
on the contents of a directory.
2021-02-21 19:57:23 +01:00
Thomas O'Donnell
64288c2e04
feat(java): Configure when the module is shown (#2353)
This makes it possible to configure when the java module is shown
based on the contents of a directory.
2021-02-21 19:57:09 +01:00
Thomas O'Donnell
c0a209f27c
feat(julia): Configure when the module is shown (#2358)
This makes it possible to configure when the julia module is shown
based on the contents of a directory.
2021-02-21 19:56:55 +01:00
Thomas O'Donnell
1a6c625521
feat(kotlin): Configure when the module is shown (#2359)
This makes it possible to configure when the kotlin module is shown
based on the contents of a directory.
2021-02-21 19:56:48 +01:00
Shu Kutsuzawa
fe6f9eeb4d
feat(purescript): Configure when the module is shown (#2357)
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.
2021-02-21 19:53:10 +01:00
Shu Kutsuzawa
efb82454f2
feat(php): Configure when the module is shown (#2356)
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.
2021-02-21 19:52:19 +01:00
Shu Kutsuzawa
51f752f6b0
feat(perl): Configure when the module is shown (#2355)
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.
2021-02-21 19:51:36 +01:00
Shu Kutsuzawa
e73581ddf0
feat(ocaml): Configure when the module is shown (#2354)
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.
2021-02-21 19:50:40 +01:00
David Knaack
509767adc0
feat(swift): Configure when the module is shown (#2349)
This makes it possible to configure when the swift module is shown
based on the contents of a directory.
2021-02-21 18:01:31 +01:00
David Knaack
a499f30157
feat(rust): Configure when the module is shown (#2350)
This makes it possible to configure when the rust module is shown
based on the contents of a directory.
2021-02-21 18:01:17 +01:00
David Knaack
9ba82e8d92
feat(ruby): Configure when the module is shown (#2351)
This makes it possible to configure when the ruby module is shown
based on the contents of a directory.
2021-02-21 18:01:01 +01:00
Shu Kutsuzawa
c0a0e85556
feat(nodejs): Configure when the module is shown (#2348)
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.
2021-02-21 13:22:40 +01:00
Shu Kutsuzawa
4651060999
feat(nim): Configure when the module is shown (#2347)
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.
2021-02-21 13:21:20 +01:00
Thomas O'Donnell
873a005c42
feat(erlang): Configure when the module is shown (#2346)
* 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>
2021-02-21 13:20:14 +01:00
Thomas O'Donnell
71b6fc1777
feat(elm): Configure when the module is shown (#2341)
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.
2021-02-20 18:33:00 +01:00
Thomas O'Donnell
9313e90773
feat(elixir): Configure when module is shown (#2340)
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.
2021-02-20 18:32:04 +01:00
Mikołaj Rosowski
37d3425d21
feat: create shell module (#2329)
* 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>
2021-02-20 15:40:49 +01:00
Thomas O'Donnell
d52edaa661
feat(dotnet): Configure when module is shown (#2327)
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.
2021-02-20 15:38:03 +01:00
Shu Kutsuzawa
5e93160456
feat(lua): Configure when the module is shown (#2326)
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.
2021-02-17 19:03:09 +01:00
Shu Kutsuzawa
97fbfffd7e
feat(golang): Configure when the module is shown (#2325)
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.
2021-02-17 18:58:21 +01:00
Shu Kutsuzawa
82c7fd6742
feat(terraform): Configure when the module is shown (#2324)
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.
2021-02-17 18:57:40 +01:00
Dietrich Daroch
96b36322e5
fix: Add a fallback prompt under TERM=dumb (#1594)
TESTED=Run it under `env`, `env 'TERM=dumb` and `env 'TERM=dumber`.
2021-02-17 18:53:42 +01:00
Thomas O'Donnell
e8f463bb57
feat(docker_context): Configure when module is shown (#2315)
* 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>
2021-02-16 20:05:43 +01:00
David Knaack
856610d53b
feat(vagrant): Configure when the module is shown (#2314)
* 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>
2021-02-15 20:21:21 +01:00
Jan Christoph Ebersbach
6bd4e724e9
fix: correct fish syntax error when setting variables (#2320) 2021-02-15 14:10:08 -05:00
Thomas O'Donnell
d0951db35a
feat(dart): Configure when the module is shown (#2312)
* 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
2021-02-14 22:21:52 +01:00
David Knaack
d4843545aa
feat(zig): Configure when the module is shown (#2311)
* feat(zig): Configure when the module is shown

* remove outdated comment
2021-02-14 22:21:44 +01:00