1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-02 00:20:51 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
David Knaack
1eaf996a36
fix(windows): avoid inadvertly running exes from cwd (#2885)
On Windows when running commands with their name instead of the path with Command::new, executable with that name from the current working directory will be executed.

This PR replaces all instances of Command::new with a new create_command function which will first resolve any executable paths and avoid this issue.
2021-07-16 15:20:59 -04:00
David Knaack
ba40ad5ce6
chore(clippy): fix new lints (#2507) 2021-03-25 16:03:19 -04:00
David Knaack
04d1332f9c
refactor(clippy): fix new lints (#2297) 2021-02-11 21:08:17 +01:00
Tilmann Meyer
2233683410
feat: add error messaging (#1576)
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.
2020-09-28 16:38:50 -04:00
Jan Katins
c93bd7b705
fix: actually disable per default disabled modules (#1677)
The default `disabled: true` is actually only available within the module (when the config struct is used and not the user toml) but not all (the hg_branch) modules checked it there again.

Document this in all places and add the check (+ test) to the hg_branch module.
2020-09-26 09:35:41 +02:00
Tilmann Meyer
88b603be38
test: introduce env variable mocking (#1490) 2020-08-07 15:13:12 -04:00
Zhenhui Xie
ec76fafff0
feat: refactor modules to use format strings (#1374) 2020-07-07 18:45:32 -04:00
David Hewson
178f177dac perf(hg_branch): Replace direct calls to hg (#803)
perf: don't use hg process to get branch / bookmark information, each call was taking 250ms and it was making on average 2 calls.
the branch and bookmark information is available in files in the root of the repo, use that instead.
now takes 300 micro seconds

fix: do not use .hgignore to decide if it is an hg repo. was providing false positives. #721

fix: after changing branch the new branch was not show (the old branch was shown), the new branch is now correctly shown. #722

fix: if no branch override was set it would say (no branch) however if you commited in that state you would commit to the branch default so say that instead
2020-01-03 17:51:45 -05:00
Luca Greco
337f213753 feat: Add the hg_branch module (#569) 2019-12-02 17:37:18 -05:00