WSL 2 changes the output of `uname -r`. For instance,
WSL 1: 4.4.0-18980-Microsoft
WSL 2: 4.19.67-microsoft-standard
Since WSL 2 lowercases the M, we can match for the rest of the string
which remains lowercase throughout both versions. Another option would
be to match for both upper- and lower-case Ms, like that:
$(uname -r) = *[Mm]icrosoft*
Fixed use of nohup in open_command where it was only necessary for
xdg-open (and actually harmful for cmd.exe in WSL 2). The current logic
is simpler and more future-proof.
An error was thrown (`bash: [: =: unary operator expected`) when using the __git_ps1_colorize_gitstring function outside of the one place it's called (line 512), because the "detached" variable was not quoted, and was unset.
An error was thrown (`bash: [: =: unary operator expected`) when using the __git_ps1_colorize_gitstring function outside of the one place it's called (line 512), because the "detached" variable was not quoted, and was unset.
There appears to be a definition issue for some functions/aliases which
result in the following errors when sourcing .zshrc:
```
/home/username/.oh-my-zsh/plugins/debian/debian.plugin.zsh:75: defining function based on alias `abd'
/home/username/.oh-my-zsh/plugins/debian/debian.plugin.zsh:75: parse error near `()'
```
Fixes#7986
The `commands[autojump]` block errs out when autojump is not found, and the rest, which is intended to be used for loading `autojump`, does not get executed.
* Use double quotes to cache value of $apt_pref and $apt_upgr
* Clean up and fix syntax of command checks
* Clean up README and document $apt_pref/$apt_upgr overriding mechanism
* Rename `ag` alias (apt upgrade) to `au`
* Clean up README and fix syntax
Fixes#3686Fixes#4660Closes#5906
Co-authored-by: Noah Vesely <fowlslegs@riseup.net>
* gitfast: use $OSTYPE again
In the last update to upstream this was reverted:
a56eac7a (Use OSTYPE instead of uname whenever possible for better speed. (#5496))
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: simplify plugin
No need to set and unset a variable we use once.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: add script to update from upstream
This would make easier the process of updating, and also not miss our
patches.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
* gitfast: update to upstream v2.21
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>