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.
* Fix bad function definitions in Debian plugin
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
* Update syntax on the remaining functions
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.
We do this because the GitHub Actions behavior was changed recently
so as to not pass secrets to action runs started from forks, therefore
the API token passed cannot be used to change PR labels.
There may be an alternative in the future.
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.
- Add mercurial support to af-magic, so now the vcs prompt will show up in either a git or hg repository
- The virtualenv prompt was white and bumped up against the user@hostname output
- Fixed that so its green (which I thought highlighted it more thematically) and has a space before user@hostname
The original suggestion for an unattended install downloads the installation script to a file, then runs that file with the --unattended argument. The install.sh file would be left behind after the suggested command was run.
This change passes the --unattended argument directly into sh. So, it's a nice one-liner like the default installation script, and it doesn't leave a dangling install.sh script.