All over oh-my-zsh I found plenty of functions and plugins
testing for the current OS or Platform.
For this PR I basically made simple is_[OS] functions that can be
used anywhere in plugins or oh-my-zsh code, instead of repeating these
over and over again.
I basically need such tests often, because my personal custom oh my zsh
additions run on macOS with Intel and M1 chips plus on different
linux's.
Functions:
- is_linux - the CPUTYPE env is linux*
- is_android - the CPUTYPE env is linux-android*
- is_netbsd the CPUTYPE env is netbsd*
- is_openbsd - the CPUTYPE env is openbsd*
- is_freebsd - the CPUTYPE env is freebsd*
- is_mac - the CPUTYPE env is darwin*
- is_mac_arm - it is darwin and has CPUTYPE arm64
- is_mac_intel - it is darwin and has CPUTYPE x86_64
- is_bsd - any BSD like OS - the CPUTYPE env is (darwin|freebsd|openbsd|netbsd)*
- is_solaris - the CPUTYPE env is solaris*
- is_cygwin - the CPUTYPE env is cygwin*
- is_msys - the CPUTYPE env is msys*
- is_windows - the CPUTYPE env is (cygwin|msys)*
Using the automation-friendly "fossil branch current" feature added in
Fossil 2.7 instead of ad hoc parsing of human-readable "fossil branch"
output. Not only does this fix a stray space in the output, it's more
robust against changes in command output in general.
Closes#11138
In BSD awk, \s is not a valid sequence interchangeable with "space or tab characters"
as it is in GNU awk. This fix uses [ \t] instead, which is all the possibilities that
we need to contemplate when reading the .zshrc file.
Fixes#11146
There are workspace settings for vscode plugins that make contributing to ohmyzsh easier. However, these would be noisy for users, especially for those that don't use vscode.
* build: harden main.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
* build: harden project.yml permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
* Update project.yml
The permissions are not necessary, because a separate token is used `GITHUB_TOKEN: ${{ secrets.PROJECT_TOKEN }}`