Commit graph

894 commits

Author SHA1 Message Date
Jan De Dobbeleer 3ded4c00fc feat(posh-git): parse environment variable
BREAKING CHANGE: this removes the posh-git segment. To mitigate,
rename the posh-git segment to git.

In case you had a custom template, make sure to migrate to the git
segment's template. You can now also leverage the same logic and
properties as the git segment in both the text template and/or
color templates.
2022-09-07 18:04:41 +02:00
Jan De Dobbeleer 17f75fa1ff refactor(git): no leading space on branch status 2022-09-07 18:04:41 +02:00
Jan De Dobbeleer 8bab255361 chore: increase timeout for golangci-lint 2022-09-02 16:37:29 +02:00
Jan De Dobbeleer 52f4ae662d fix(ansi): return original text on [ only strings
resolves #2739
2022-09-02 16:37:29 +02:00
Jan De Dobbeleer 336f351b98 fix(link): allow multiple links in segment text 2022-09-02 10:04:22 +02:00
Jan De Dobbeleer 56a59a1b32 feat(git): add link to GitKraken 2022-09-02 10:04:22 +02:00
L. Yeung 5df8d89902 fix(path): map to default registry icon correctly 2022-09-01 11:02:14 +02:00
L. Yeung e5b3b00a43 fix(git): populate .Dir and .RepoName correctly 2022-09-01 11:02:14 +02:00
Jan De Dobbeleer 2a1fdffb73 fix(git): align git Dir with PWD 2022-08-31 12:06:48 +02:00
L. Yeung f04e22a5d1 fix(environment): check WSL shared path correctly 2022-08-30 15:25:40 +02:00
L. Yeung 0b77995d80 fix(scm): convert to Windows path with / instead of \ 2022-08-29 17:08:34 +02:00
L. Yeung 7e141fb5ec fix(environment): detect WSL shared path correctly 2022-08-29 10:57:12 +02:00
Jan De Dobbeleer c93d637128 fix(font): do not fail on non-admin for Windows 2022-08-29 08:27:31 +02:00
Jan De Dobbeleer 16d278ace3 refactor(font): do not notify on Windows
relates to #2690
2022-08-29 08:27:31 +02:00
Jan De Dobbeleer 8c7deb1ec2 chore(windows): remove asset files 2022-08-29 08:27:31 +02:00
Jan De Dobbeleer 4f9875a8bb fix(font): do not crash on enter
relates to #2690
2022-08-29 08:27:31 +02:00
Jan De Dobbeleer 4213be5190 fix(git): align .Dir with .PWD
no trailing /
2022-08-29 08:27:31 +02:00
Jan De Dobbeleer 199993b891 fix(wsl): only validate the mounted windows drive
resolves #2632
2022-08-28 18:59:10 +02:00
Jan De Dobbeleer 07eba99d6e feat(git): expose directory 2022-08-28 15:40:20 +02:00
L. Yeung c0935c87f2 fix(shell): escape special characters correctly 2022-08-28 08:35:54 +02:00
Jan De Dobbeleer dfae989782 fix(pwsh): escape backticks correctly 2022-08-27 21:56:30 +02:00
Jan De Dobbeleer eabe6b3a7a fix(bash): escape console title sequences
resolves #2702
2022-08-27 21:56:30 +02:00
Jan De Dobbeleer 4572a6a8b9 fix(fish): no transient on autosuggestion
resolves #2708
2022-08-27 21:56:30 +02:00
Jan De Dobbeleer 29c7a2751b feat(windows): manifest file 2022-08-26 22:28:26 +02:00
L. Yeung 2f4ebfc493 fix(nu): set initial execution time to 0 2022-08-25 07:46:06 +02:00
L. Yeung c120527696 fix(cmd): escape special characters in a tip 2022-08-23 11:13:28 +02:00
L. Yeung 4e25c7c1c9 feat(shell): perform cleanup for a new initialization 2022-08-22 18:57:01 +02:00
L. Yeung 8de89185e2 fix(cmd): do not evaluate execution time for an empty command 2022-08-20 18:37:24 +02:00
L. Yeung dbcfab3480 fix(pwsh): check presence of "posh-git" module 2022-08-18 17:24:35 +02:00
Jan De Dobbeleer 04f7528f55
fix(http): correct logic for authentication header 2022-08-18 08:50:56 +02:00
Stephen Judd f6ec503bbf
feat: add Google Cloud (gcp) segment 2022-08-17 18:12:18 +02:00
Jan De Dobbeleer 698cbc4135 fix(sysinfo): validate array before assignment
resolves #2672
2022-08-17 13:43:46 +02:00
Jan De Dobbeleer 32f1977bdc
feat(wakatime): parse url as template 2022-08-16 20:55:08 +02:00
Jan De Dobbeleer 5502acb585 feat(nx): show segment on nx.json presence 2022-08-13 13:41:28 +02:00
L. Yeung a64bc19698 fix(pwsh): pass --strict flag correctly in initialization 2022-08-10 16:27:34 +02:00
L. Yeung cc1850cfd1 revert(bash): use \001 and \002 as decoration wrapper
This reverts commit 4d1f8f4.
2022-08-10 13:21:00 +02:00
L. Yeung d5a8ec3285 fix(pwsh): set initial value for $script:ExecutionTime 2022-08-09 18:59:23 +02:00
L. Yeung 83c1af63b4 refactor(bash): simplify timer 2022-08-09 11:19:43 +02:00
Jan De Dobbeleer 3345017b2d fix(pwsh): validate execution time type
resolves #2633
2022-08-09 10:00:24 +02:00
Jan De Dobbeleer 4e992d48d1 fix(pwsh): set default value for ErrorCode
resolves #2633
2022-08-09 06:59:35 +02:00
L. Yeung db8eac7c5d fix(shell): quote paths properly in init scripts 2022-08-09 06:59:35 +02:00
Jan De Dobbeleer 210629fd26 feat: delete expired cache entries on init 2022-08-07 11:35:52 +02:00
Jan De Dobbeleer 929e460c4e refactor(ipify): use generic http request 2022-08-05 22:26:27 +02:00
Jan De Dobbeleer cccb502989 refactor: do generic http request 2022-08-05 22:26:27 +02:00
eduardo e307b2f706 feat(ipfy): add offline response 2022-08-05 12:59:55 +02:00
Jan De Dobbeleer 5f063e80f3 chore(lint): nolint should be written without leading space 2022-08-05 08:38:17 +02:00
Jan De Dobbeleer 35efd3cf00 feat: remove functions to enable prompt features 2022-08-05 08:38:17 +02:00
Jan De Dobbeleer 4d1f8f4ea0 refactor(bash): use \001 and \002 as decoration wrapper 2022-08-05 08:38:17 +02:00
Piotr Kalinowski a2533c8f5b fix(git): better cross-platform path resolution and tests
The simple filepath.IsAbs() is not enough on Windows, where the relative
path may start with a separator and should then be taken relative to the
volume name.

So, introduce resolveGitPath() helper function that will do the right
thing on both Windows and other systems. As a bonus, it returns paths
converted to slashes for ease of use with the rest of the git segment:
- Git for Windows uses only slashes.
- Slashes do work as a path separator on Windows anyway.
- Some tests in git segment still use (and rightfully so) slashes.

Add tests for resolveGitPath() on both types of systems and fix
TestEnableInWorktree using a system-dependent testing constant as a root
path.
2022-08-03 18:20:00 +02:00
Piotr Kalinowski 3895210ab3 fix(git): further fixes for submodule worktrees
filepath.Join() just concatenates paths. We have to check manually for
an absolute path and discard the first component to end up with the
correct path.

Also, fix the tests to demonstrate actual behaviour of git, not what
filepath.Join() was doing.

Additionally, note that on Windows git paths in gitdir use unix
separators, so search for `/worktrees/` instead of using system
separator, just like when processing all the other cases.
2022-08-03 18:20:00 +02:00