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
Previously, OS detection would happen on each invocation. This makes it
happen once (unless it fails, in which case it will try again on the
next invocation).
This has the additional benefit of localizing the platform-specific
checks and commands, too, versus spreading them out in separate
functions.
Ideally the parameter would just be removed-users could always
just do "clipcopy < some-file". but removing the parameter would break
backwards compatibility.
In any case, this simplifies the logic considerably.