1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 20:31:00 +01:00

4 Commits

Author SHA1 Message Date
Adam Page
de1ca65dca feat(procs): support completion for procs<0.14 (#13053)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2025-04-19 21:08:03 +02:00
Arthur
92bad89f8a docs(asdf): update usage example (#13055) 2025-04-19 20:55:23 +02:00
Roeniss Moon
9957e4e8be feat(git): add gcfu alias for commit --fixup (#13027) 2025-04-19 20:48:34 +02:00
deimosian
b92874c716 fix(archlinux): properly check keyring version (#12979) 2025-04-19 20:44:45 +02:00
5 changed files with 34 additions and 14 deletions

View File

@@ -178,26 +178,27 @@ fi
# Check Arch Linux PGP Keyring before System Upgrade to prevent failure. # Check Arch Linux PGP Keyring before System Upgrade to prevent failure.
function upgrade() { function upgrade() {
sudo pacman -Sy
echo ":: Checking Arch Linux PGP Keyring..." echo ":: Checking Arch Linux PGP Keyring..."
local installedver="$(LANG= sudo pacman -Qi archlinux-keyring | grep -Po '(?<=Version : ).*')" local installedver="$(LANG= sudo pacman -Qi archlinux-keyring | grep -Po '(?<=Version : ).*')"
local currentver="$(LANG= sudo pacman -Si archlinux-keyring | grep -Po '(?<=Version : ).*')" local currentver="$(LANG= sudo pacman -Si archlinux-keyring | grep -Po '(?<=Version : ).*')"
if [ $installedver != $currentver ]; then if [ $installedver != $currentver ]; then
echo " Arch Linux PGP Keyring is out of date." echo " Arch Linux PGP Keyring is out of date."
echo " Updating before full system upgrade." echo " Updating before full system upgrade."
sudo pacman -Sy --needed --noconfirm archlinux-keyring sudo pacman -S --needed --noconfirm archlinux-keyring
else else
echo " Arch Linux PGP Keyring is up to date." echo " Arch Linux PGP Keyring is up to date."
echo " Proceeding with full system upgrade." echo " Proceeding with full system upgrade."
fi fi
if (( $+commands[yay] )); then if (( $+commands[yay] )); then
yay -Syu yay -Su
elif (( $+commands[trizen] )); then elif (( $+commands[trizen] )); then
trizen -Syu trizen -Su
elif (( $+commands[pacaur] )); then elif (( $+commands[pacaur] )); then
pacaur -Syu pacaur -Su
elif (( $+commands[aura] )); then elif (( $+commands[aura] )); then
sudo aura -Syu sudo aura -Su
else else
sudo pacman -Syu sudo pacman -Su
fi fi
} }

View File

@@ -19,21 +19,30 @@ Example for installing the nodejs plugin and the many runtimes for it:
```sh ```sh
# Add plugin to asdf # Add plugin to asdf
asdf plugin add nodejs asdf plugin add nodejs
# Install the latest available nodejs runtime version # Install the latest available version
asdf install nodejs latest asdf install nodejs latest
# Install nodejs v16.5.0 runtime version # Uninstall the latest version
asdf uninstall nodejs latest
# Install a specific version
asdf install nodejs 16.5.0 asdf install nodejs 16.5.0
# Set the latest version in .tools-version in the current working directory # Set the latest version in .tool-versions of the `current directory`
asdf set nodejs latest asdf set nodejs latest
# Set a version globally that will apply to all directories under $HOME # Set a specific version in the `parent directory`
asdf set -u nodejs 16.5.0 asdf set -p nodejs 16.5.0 # -p is shorthand for --parent
# Set a global version under `$HOME`
asdf set -u nodejs 16.5.0 # -u is shorthand for --home
``` ```
For more commands, run `asdf help` or refer to the
[asdf CLI documentation](https://asdf-vm.com/manage/commands.html#all-commands).
## Maintainer ## Maintainer
- [@RobLoach](https://github.com/RobLoach) - [@RobLoach](https://github.com/RobLoach)

View File

@@ -79,6 +79,7 @@ plugins=(... git)
| `gcss` | `git commit -S -s` | | `gcss` | `git commit -S -s` |
| `gcssm` | `git commit -S -s -m` | | `gcssm` | `git commit -S -s -m` |
| `gcf` | `git config --list` | | `gcf` | `git config --list` |
| `gcfu` | `git commit --fixup` |
| `gdct` | `git describe --tags $(git rev-list --tags --max-count=1)` | | `gdct` | `git describe --tags $(git rev-list --tags --max-count=1)` |
| `gd` | `git diff` | | `gd` | `git diff` |
| `gdca` | `git diff --cached` | | `gdca` | `git diff --cached` |

View File

@@ -200,6 +200,7 @@ alias gc!='git commit --verbose --amend'
alias gcn='git commit --verbose --no-edit' alias gcn='git commit --verbose --no-edit'
alias gcn!='git commit --verbose --no-edit --amend' alias gcn!='git commit --verbose --no-edit --amend'
alias gcf='git config --list' alias gcf='git config --list'
alias gcfu='git commit --fixup'
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
alias gd='git diff' alias gd='git diff'
alias gdca='git diff --cached' alias gdca='git diff --cached'

View File

@@ -3,11 +3,19 @@ if (( ! $+commands[procs] )); then
fi fi
# If the completion file doesn't exist yet, we need to autoload it and # If the completion file doesn't exist yet, we need to autoload it and
# bind it to `minikube`. Otherwise, compinit will have already done that. # bind it to `procs`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_procs" ]]; then if [[ ! -f "$ZSH_CACHE_DIR/completions/_procs" ]]; then
typeset -g -A _comps typeset -g -A _comps
autoload -Uz _procs autoload -Uz _procs
_comps[procs]=_procs _comps[procs]=_procs
fi fi
procs --gen-completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs" &| {
autoload -Uz is-at-least
local _version=$(procs --version)
if is-at-least "0.14" "${_version#procs }"; then
procs --gen-completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs"
else
procs --completion-out zsh >| "$ZSH_CACHE_DIR/completions/_procs"
fi
} &|