From 279212f2ccab902911cd55f3380374f5be6e05db Mon Sep 17 00:00:00 2001 From: Max Staff Date: Tue, 6 Apr 2021 12:23:59 +0200 Subject: feat(theme_chooser): display non-zero exit code (#8428) Fixes #8427 --- tools/theme_chooser.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/theme_chooser.sh b/tools/theme_chooser.sh index 82ae5857c..3883f1d37 100755 --- a/tools/theme_chooser.sh +++ b/tools/theme_chooser.sh @@ -25,6 +25,7 @@ function theme_preview() { print "$fg[blue]${(l.((${COLUMNS}-${#THEME_NAME}-5))..─.)}$reset_color $THEME_NAME $fg[blue]───$reset_color" source "$THEMES_DIR/$THEME" cols=$(tput cols) + (exit 1) print -P "$PROMPT $RPROMPT" } -- cgit v1.2.3-70-g09d2 From 790f185e0fd8b70eab33847afe02af07f6af3a1e Mon Sep 17 00:00:00 2001 From: ratijas Date: Tue, 6 Apr 2021 13:28:22 +0300 Subject: refactor(archlinux): fix name & scripts; reorder aliases (#9546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/archlinux/README.md | 276 +++++++++++++++++---------------- plugins/archlinux/archlinux.plugin.zsh | 260 +++++++++++++------------------ 2 files changed, 253 insertions(+), 283 deletions(-) diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md index 5882c7603..a4f191a5f 100644 --- a/plugins/archlinux/README.md +++ b/plugins/archlinux/README.md @@ -1,4 +1,4 @@ -# Archlinux plugin +# Arch Linux plugin This plugin adds some aliases and functions to work with Arch Linux. @@ -10,145 +10,159 @@ plugins=(... archlinux) ## Features -#### YAY - -| Alias | Command | Description | -|---------|------------------------------------|---------------------------------------------------------------------| -| yaconf | yay -Pg | Print current configuration | -| yain | yay -S | Install packages from the repositories | -| yains | yay -U | Install a package from a local file | -| yainsd | yay -S --asdeps | Install packages as dependencies of another package | -| yaloc | yay -Qi | Display information about a package in the local database | -| yalocs | yay -Qs | Search for packages in the local database | -| yalst | yay -Qe | List installed packages including from AUR (tagged as "local") | -| yamir | yay -Syy | Force refresh of all package lists after updating mirrorlist | -| yaorph | yay -Qtd | Remove orphans using yay | -| yare | yay -R | Remove packages, keeping its settings and dependencies | -| yarem | yay -Rns | Remove packages, including its settings and unneeded dependencies | -| yarep | yay -Si | Display information about a package in the repositories | -| yareps | yay -Ss | Search for packages in the repositories | -| yaupg | yay -Syu | Sync with repositories before upgrading packages | -| yasu | yay -Syu --no-confirm | Same as `yaupg`, but without confirmation | - -#### TRIZEN - -| Alias | Command | Description | -|---------|------------------------------------|---------------------------------------------------------------------| -| trconf | trizen -C | Fix all configuration files with vimdiff | -| trin | trizen -S | Install packages from the repositories | -| trins | trizen -U | Install a package from a local file | -| trinsd | trizen -S --asdeps | Install packages as dependencies of another package | -| trloc | trizen -Qi | Display information about a package in the local database | -| trlocs | trizen -Qs | Search for packages in the local database | -| trlst | trizen -Qe | List installed packages including from AUR (tagged as "local") | -| trmir | trizen -Syy | Force refresh of all package lists after updating mirrorlist | -| trorph | trizen -Qtd | Remove orphans using yaourt | -| trre | trizen -R | Remove packages, keeping its settings and dependencies | -| trrem | trizen -Rns | Remove packages, including its settings and unneeded dependencies | -| trrep | trizen -Si | Display information about a package in the repositories | -| trreps | trizen -Ss | Search for packages in the repositories | -| trupd | trizen -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases | -| trupd | trizen -Sy && sudo abs | Update and refresh the local package and ABS databases | -| trupd | trizen -Sy && sudo aur | Update and refresh the local package and AUR databases | -| trupd | trizen -Sy | Update and refresh the local package database | -| trupg | trizen -Syua | Sync with repositories before upgrading all packages (from AUR too) | -| trsu | trizen -Syua --no-confirm | Same as `trupg`, but without confirmation | -| upgrade | trizen -Syu | Sync with repositories before upgrading packages | - -#### YAOURT - -| Alias | Command | Description | -|---------|------------------------------------|---------------------------------------------------------------------| -| yaconf | yaourt -C | Fix all configuration files with vimdiff | -| yain | yaourt -S | Install packages from the repositories | -| yains | yaourt -U | Install a package from a local file | -| yainsd | yaourt -S --asdeps | Install packages as dependencies of another package | -| yaloc | yaourt -Qi | Display information about a package in the local database | -| yalocs | yaourt -Qs | Search for packages in the local database | -| yalst | yaourt -Qe | List installed packages including from AUR (tagged as "local") | -| yamir | yaourt -Syy | Force refresh of all package lists after updating mirrorlist | -| yaorph | yaourt -Qtd | Remove orphans using yaourt | -| yare | yaourt -R | Remove packages, keeping its settings and dependencies | -| yarem | yaourt -Rns | Remove packages, including its settings and unneeded dependencies | -| yarep | yaourt -Si | Display information about a package in the repositories | -| yareps | yaourt -Ss | Search for packages in the repositories | -| yaupd | yaourt -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases | -| yaupd | yaourt -Sy && sudo abs | Update and refresh the local package and ABS databases | -| yaupd | yaourt -Sy && sudo aur | Update and refresh the local package and AUR databases | -| yaupd | yaourt -Sy | Update and refresh the local package database | -| yaupg | yaourt -Syua | Sync with repositories before upgrading all packages (from AUR too) | -| yasu | yaourt -Syua --no-confirm | Same as `yaupg`, but without confirmation | -| upgrade | yaourt -Syu | Sync with repositories before upgrading packages | - -#### PACAUR - -| Alias | Command | Description | -|---------|------------------------------------|---------------------------------------------------------------------| -| pain | pacaur -S | Install packages from the repositories | -| pains | pacaur -U | Install a package from a local file | -| painsd | pacaur -S --asdeps | Install packages as dependencies of another package | -| paloc | pacaur -Qi | Display information about a package in the local database | -| palocs | pacaur -Qs | Search for packages in the local database | -| palst | pacaur -Qe | List installed packages including from AUR (tagged as "local") | -| pamir | pacaur -Syy | Force refresh of all package lists after updating mirrorlist | -| paorph | pacaur -Qtd | Remove orphans using pacaur | -| pare | pacaur -R | Remove packages, keeping its settings and dependencies | -| parem | pacaur -Rns | Remove packages, including its settings and unneeded dependencies | -| parep | pacaur -Si | Display information about a package in the repositories | -| pareps | pacaur -Ss | Search for packages in the repositories | -| paupd | pacaur -Sy && sudo abs && sudo aur | Update and refresh local package, ABS and AUR databases | -| paupd | pacaur -Sy && sudo abs | Update and refresh the local package and ABS databases | -| paupd | pacaur -Sy && sudo aur | Update and refresh the local package and AUR databases | -| paupd | pacaur -Sy | Update and refresh the local package database | -| paupg | pacaur -Syua | Sync with repositories before upgrading all packages (from AUR too) | -| pasu | pacaur -Syua --no-confirm | Same as `paupg`, but without confirmation | -| upgrade | pacaur -Syu | Sync with repositories before upgrading packages | - -#### PACMAN - -| Alias | Command | Description | -|--------------|-----------------------------------------|--------------------------------------------------------------| -| pacin | sudo pacman -S | Install packages from the repositories | -| pacins | sudo pacman -U | Install a package from a local file | -| pacinsd | sudo pacman -S --asdeps | Install packages as dependencies of another package | -| pacloc | pacman -Qi | Display information about a package in the local database | -| paclocs | pacman -Qs | Search for packages in the local database | -| paclsorphans | sudo pacman -Qdt | List all orphaned packages | -| pacmir | sudo pacman -Syy | Force refresh of all package lists after updating mirrorlist | -| pacre | sudo pacman -R | Remove packages, keeping its settings and dependencies | -| pacrem | sudo pacman -Rns | Remove packages, including its settings and dependencies | -| pacrep | pacman -Si | Display information about a package in the repositories | -| pacreps | pacman -Ss | Search for packages in the repositories | -| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq) | Delete all orphaned packages | -| pacupd | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases | -| pacupd | sudo pacman -Sy && sudo abs | Update and refresh the local package and ABS databases | -| pacupd | sudo pacman -Sy && sudo aur | Update and refresh the local package and AUR databases | -| pacupd | sudo pacman -Sy | Update and refresh the local package database | -| pacupg | sudo pacman -Syu | Sync with repositories before upgrading packages | -| upgrade | sudo pacman -Syu | Sync with repositories before upgrading packages | -| pacfileupg | sudo pacman -Fy | Download fresh package databases from the server | -| pacfiles | pacman -F | Search package file names for matching strings | -| pacls | pacman -Ql | List files in a package | -| pacown | pacman -Qo | Show which package owns a file | - -| Function | Description | -|----------------|------------------------------------------------------| -| pacdisowned | List all disowned files in your system | -| paclist | List all installed packages with a short description | -| pacmanallkeys | Get all keys for developers and trusted users | -| pacmansignkeys | Locally trust all keys passed as parameters | -| pacweb | Open the website of an ArchLinux package | +### Pacman + +| Alias | Command | Description | +|--------------|----------------------------------------|------------------------------------------------------------------| +| pacin | `sudo pacman -S` | Install packages from the repositories | +| pacins | `sudo pacman -U` | Install a package from a local file | +| pacinsd | `sudo pacman -S --asdeps` | Install packages as dependencies of another package | +| pacloc | `pacman -Qi` | Display information about a package in the local database | +| paclocs | `pacman -Qs` | Search for packages in the local database | +| paclsorphans | `sudo pacman -Qdt` | List all orphaned packages | +| pacmir | `sudo pacman -Syy` | Force refresh of all package lists after updating mirrorlist | +| pacre | `sudo pacman -R` | Remove packages, keeping its settings and dependencies | +| pacrem | `sudo pacman -Rns` | Remove packages, including its settings and dependencies | +| pacrep | `pacman -Si` | Display information about a package in the repositories | +| pacreps | `pacman -Ss` | Search for packages in the repositories | +| pacrmorphans | `sudo pacman -Rs $(pacman -Qtdq)` | Delete all orphaned packages | +| pacupd | `sudo pacman -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| pacupg | `sudo pacman -Syu` | Sync with repositories before upgrading packages | +| pacfileupg | `sudo pacman -Fy` | Download fresh package databases from the server | +| pacfiles | `pacman -F` | Search package file names for matching strings | +| pacls | `pacman -Ql` | List files in a package | +| pacown | `pacman -Qo` | Show which package owns a file | +| upgrade[³](#f3) | `sudo pacman -Syu` | Sync with repositories before upgrading packages | + +| Function | Description | +|----------------|-----------------------------------------------------------| +| pacdisowned | List all disowned files in your system | +| paclist | List all explicitly installed packages with a description | +| pacmanallkeys | Get all keys for developers and trusted users | +| pacmansignkeys | Locally trust all keys passed as parameters | +| pacweb | Open the website of an ArchLinux package | + +Note: paclist used to print packages with a description which are (1) explicitly installed +and (2) available for upgrade. Due to flawed scripting, it also printed all packages if no +upgrades were available. Use `pacman -Que` instead. + +### AUR helpers + +#### Pacaur + +| Alias | Command | Description | +|---------|-----------------------------------|---------------------------------------------------------------------| +| pain | `pacaur -S` | Install packages from the repositories | +| pains | `pacaur -U` | Install a package from a local file | +| painsd | `pacaur -S --asdeps` | Install packages as dependencies of another package | +| paloc | `pacaur -Qi` | Display information about a package in the local database | +| palocs | `pacaur -Qs` | Search for packages in the local database | +| palst | `pacaur -Qe` | List installed packages including from AUR (tagged as "local") | +| pamir | `pacaur -Syy` | Force refresh of all package lists after updating mirrorlist | +| paorph | `pacaur -Qtd` | Remove orphans using pacaur | +| pare | `pacaur -R` | Remove packages, keeping its settings and dependencies | +| parem | `pacaur -Rns` | Remove packages, including its settings and unneeded dependencies | +| parep | `pacaur -Si` | Display information about a package in the repositories | +| pareps | `pacaur -Ss` | Search for packages in the repositories | +| paupd | `pacaur -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| paupg | `pacaur -Syua` | Sync with repositories before upgrading all packages (from AUR too) | +| pasu | `pacaur -Syua --no-confirm` | Same as `paupg`, but without confirmation | +| upgrade[³](#f3) | `pacaur -Syu` | Sync with repositories before upgrading packages | + +#### Trizen + +| Alias | Command | Description | +|---------|-----------------------------------|---------------------------------------------------------------------| +| trconf | `trizen -C` | Fix all configuration files with vimdiff | +| trin | `trizen -S` | Install packages from the repositories | +| trins | `trizen -U` | Install a package from a local file | +| trinsd | `trizen -S --asdeps` | Install packages as dependencies of another package | +| trloc | `trizen -Qi` | Display information about a package in the local database | +| trlocs | `trizen -Qs` | Search for packages in the local database | +| trlst | `trizen -Qe` | List installed packages including from AUR (tagged as "local") | +| trmir | `trizen -Syy` | Force refresh of all package lists after updating mirrorlist | +| trorph | `trizen -Qtd` | Remove orphans using yaourt | +| trre | `trizen -R` | Remove packages, keeping its settings and dependencies | +| trrem | `trizen -Rns` | Remove packages, including its settings and unneeded dependencies | +| trrep | `trizen -Si` | Display information about a package in the repositories | +| trreps | `trizen -Ss` | Search for packages in the repositories | +| trupd | `trizen -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| trupg | `trizen -Syua` | Sync with repositories before upgrading all packages (from AUR too) | +| trsu | `trizen -Syua --no-confirm` | Same as `trupg`, but without confirmation | +| upgrade[³](#f3) | `trizen -Syu` | Sync with repositories before upgrading packages | + +#### Yaourt[²](#f2) + +| Alias | Command | Description | +|---------|-----------------------------------|---------------------------------------------------------------------| +| yaconf | `yaourt -C` | Fix all configuration files with vimdiff | +| yain | `yaourt -S` | Install packages from the repositories | +| yains | `yaourt -U` | Install a package from a local file | +| yainsd | `yaourt -S --asdeps` | Install packages as dependencies of another package | +| yaloc | `yaourt -Qi` | Display information about a package in the local database | +| yalocs | `yaourt -Qs` | Search for packages in the local database | +| yalst | `yaourt -Qe` | List installed packages including from AUR (tagged as "local") | +| yamir | `yaourt -Syy` | Force refresh of all package lists after updating mirrorlist | +| yaorph | `yaourt -Qtd` | Remove orphans using yaourt | +| yare | `yaourt -R` | Remove packages, keeping its settings and dependencies | +| yarem | `yaourt -Rns` | Remove packages, including its settings and unneeded dependencies | +| yarep | `yaourt -Si` | Display information about a package in the repositories | +| yareps | `yaourt -Ss` | Search for packages in the repositories | +| yaupd | `yaourt -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| yaupg | `yaourt -Syua` | Sync with repositories before upgrading all packages (from AUR too) | +| yasu | `yaourt -Syua --no-confirm` | Same as `yaupg`, but without confirmation | +| upgrade[³](#f3) | `yaourt -Syu` | Sync with repositories before upgrading packages | + +#### Yay[²](#f2) + +| Alias | Command | Description | +|---------|--------------------------------|-------------------------------------------------------------------| +| yaconf | `yay -Pg` | Print current configuration | +| yain | `yay -S` | Install packages from the repositories | +| yains | `yay -U` | Install a package from a local file | +| yainsd | `yay -S --asdeps` | Install packages as dependencies of another package | +| yaloc | `yay -Qi` | Display information about a package in the local database | +| yalocs | `yay -Qs` | Search for packages in the local database | +| yalst | `yay -Qe` | List installed packages including from AUR (tagged as "local") | +| yamir | `yay -Syy` | Force refresh of all package lists after updating mirrorlist | +| yaorph | `yay -Qtd` | Remove orphans using yay | +| yare | `yay -R` | Remove packages, keeping its settings and dependencies | +| yarem | `yay -Rns` | Remove packages, including its settings and unneeded dependencies | +| yarep | `yay -Si` | Display information about a package in the repositories | +| yareps | `yay -Ss` | Search for packages in the repositories | +| yaupd | `yay -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| yaupg | `yay -Syu` | Sync with repositories before upgrading packages | +| yasu | `yay -Syu --no-confirm` | Same as `yaupg`, but without confirmation | +| upgrade[³](#f3) | `yay -Syu` | Sync with repositories before upgrading packages | --- +¹ +If the `abs` and/or `aur` commands are present, `sudo abs` and `sudo aur` are also +called to update the ABS and AUR databases. + +² +Yay and Yaourt aliases overlap. If both are installed, yay will take precedence. + +³ +The `upgrade` alias is set for all package managers. Its value will depend on +whether the package manager is installed, checked in the following order: + +1. `yay` +2. `yaourt` +3. `trizen` +4. `pacaur` +5. `pacman` + ## Contributors - Benjamin Boudreau - dreurmail@gmail.com - Celso Miranda - contacto@celsomiranda.net +- ratijas (ivan tkachenko) - me@ratijas.tk +- Juraj Fiala - doctorjellyface@riseup.net - KhasMek - Boushh@gmail.com +- Majora320 (Moses Miller) - Majora320@gmail.com - Martin Putniorz - mputniorz@gmail.com - MatthR3D - matthr3d@gmail.com - ornicar - thibault.duplessis@gmail.com -- Juraj Fiala - doctorjellyface@riseup.net -- Majora320 (Moses Miller) - Majora320@gmail.com - Ybalrid (Arthur Brainville) - ybalrid@ybalrid.info diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 32f09cef9..d53761077 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -1,138 +1,12 @@ -if (( $+commands[trizen] )); then - alias trconf='trizen -C' - alias trupg='trizen -Syua' - alias trsu='trizen -Syua --noconfirm' - alias trin='trizen -S' - alias trins='trizen -U' - alias trre='trizen -R' - alias trrem='trizen -Rns' - alias trrep='trizen -Si' - alias trreps='trizen -Ss' - alias trloc='trizen -Qi' - alias trlocs='trizen -Qs' - alias trlst='trizen -Qe' - alias trorph='trizen -Qtd' - alias trinsd='trizen -S --asdeps' - alias trmir='trizen -Syy' +####################################### +# Pacman # +####################################### +# abs and aur command check +local abs_aur='' +(( ! $+commands[abs] )) || abs_aur+=' && sudo abs' +(( ! $+commands[aur] )) || abs_aur+=' && sudo aur' - if (( $+commands[abs] && $+commands[aur] )); then - alias trupd='trizen -Sy && sudo abs && sudo aur' - elif (( $+commands[abs] )); then - alias trupd='trizen -Sy && sudo abs' - elif (( $+commands[aur] )); then - alias trupd='trizen -Sy && sudo aur' - else - alias trupd='trizen -Sy' - fi -fi - -if (( $+commands[yaourt] )); then - alias yaconf='yaourt -C' - alias yaupg='yaourt -Syua' - alias yasu='yaourt -Syua --noconfirm' - alias yain='yaourt -S' - alias yains='yaourt -U' - alias yare='yaourt -R' - alias yarem='yaourt -Rns' - alias yarep='yaourt -Si' - alias yareps='yaourt -Ss' - alias yaloc='yaourt -Qi' - alias yalocs='yaourt -Qs' - alias yalst='yaourt -Qe' - alias yaorph='yaourt -Qtd' - alias yainsd='yaourt -S --asdeps' - alias yamir='yaourt -Syy' - - - if (( $+commands[abs] && $+commands[aur] )); then - alias yaupd='yaourt -Sy && sudo abs && sudo aur' - elif (( $+commands[abs] )); then - alias yaupd='yaourt -Sy && sudo abs' - elif (( $+commands[aur] )); then - alias yaupd='yaourt -Sy && sudo aur' - else - alias yaupd='yaourt -Sy' - fi -fi - -if (( $+commands[yay] )); then - alias yaconf='yay -Pg' - alias yaupg='yay -Syu' - alias yasu='yay -Syu --noconfirm' - alias yain='yay -S' - alias yains='yay -U' - alias yare='yay -R' - alias yarem='yay -Rns' - alias yarep='yay -Si' - alias yareps='yay -Ss' - alias yaloc='yay -Qi' - alias yalocs='yay -Qs' - alias yalst='yay -Qe' - alias yaorph='yay -Qtd' - alias yainsd='yay -S --asdeps' - alias yamir='yay -Syy' - - - if (( $+commands[abs] && $+commands[aur] )); then - alias yaupd='yay -Sy && sudo abs && sudo aur' - elif (( $+commands[abs] )); then - alias yaupd='yay -Sy && sudo abs' - elif (( $+commands[aur] )); then - alias yaupd='yay -Sy && sudo aur' - else - alias yaupd='yay -Sy' - fi -fi - -if (( $+commands[pacaur] )); then - alias paupg='pacaur -Syu' - alias pasu='pacaur -Syu --noconfirm' - alias pain='pacaur -S' - alias pains='pacaur -U' - alias pare='pacaur -R' - alias parem='pacaur -Rns' - alias parep='pacaur -Si' - alias pareps='pacaur -Ss' - alias paloc='pacaur -Qi' - alias palocs='pacaur -Qs' - alias palst='pacaur -Qe' - alias paorph='pacaur -Qtd' - alias painsd='pacaur -S --asdeps' - alias pamir='pacaur -Syy' - - if (( $+commands[abs] && $+commands[aur] )); then - alias paupd='pacaur -Sy && sudo abs && sudo aur' - elif (( $+commands[abs] )); then - alias paupd='pacaur -Sy && sudo abs' - elif (( $+commands[aur] )); then - alias paupd='pacaur -Sy && sudo aur' - else - alias paupd='pacaur -Sy' - fi -fi - -if (( $+commands[trizen] )); then - function upgrade() { - trizen -Syu - } -elif (( $+commands[pacaur] )); then - function upgrade() { - pacaur -Syu - } -elif (( $+commands[yaourt] )); then - function upgrade() { - yaourt -Syu - } -elif (( $+commands[yay] )); then - function upgrade() { - yay -Syu - } -else - function upgrade() { - sudo pacman -Syu - } -fi # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips alias pacupg='sudo pacman -Syu' @@ -152,22 +26,14 @@ alias pacfileupg='sudo pacman -Fy' alias pacfiles='pacman -F' alias pacls='pacman -Ql' alias pacown='pacman -Qo' - - -if (( $+commands[abs] && $+commands[aur] )); then - alias pacupd='sudo pacman -Sy && sudo abs && sudo aur' -elif (( $+commands[abs] )); then - alias pacupd='sudo pacman -Sy && sudo abs' -elif (( $+commands[aur] )); then - alias pacupd='sudo pacman -Sy && sudo aur' -else - alias pacupd='sudo pacman -Sy' -fi +alias pacupd="sudo pacman -Sy$abs_aur" +alias upgrade='sudo pacman -Syu' function paclist() { - # Source: https://bbs.archlinux.org/viewtopic.php?id=93683 - LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \ - awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}' + # Based on https://bbs.archlinux.org/viewtopic.php?id=93683 + pacman -Qqe | \ + xargs -I '{}' \ + expac "${bold_color}% 20n ${fg_no_bold[white]}%d${reset_color}" '{}' } function pacdisowned() { @@ -187,11 +53,7 @@ function pacdisowned() { comm -23 "$fs" "$db" } -function pacmanallkeys() { - curl -sL https://www.archlinux.org/people/{developers,trusted-users}/ | \ - awk -F\" '(/keyserver.ubuntu.com/) { sub(/.*search=0x/,""); print $1}' | \ - xargs sudo pacman-key --recv-keys -} +alias pacmanallkeys='sudo pacman-key --refresh-keys' function pacmansignkeys() { local key @@ -205,6 +67,15 @@ function pacmansignkeys() { if (( $+commands[xdg-open] )); then function pacweb() { + if [[ $# = 0 || "$1" =~ '--help|-h' ]]; then + local underline_color="\e[${color[underline]}m" + echo "$0 - open the website of an ArchLinux package" + echo + echo "Usage:" + echo " $bold_color$0$reset_color ${underline_color}target${reset_color}" + return 1 + fi + local pkg="$1" local infos="$(LANG=C pacman -Si "$pkg")" if [[ -z "$infos" ]]; then @@ -215,3 +86,88 @@ if (( $+commands[xdg-open] )); then xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null } fi + +####################################### +# AUR helpers # +####################################### + +if (( $+commands[pacaur] )); then + alias paupg='pacaur -Syu' + alias pasu='pacaur -Syu --noconfirm' + alias pain='pacaur -S' + alias pains='pacaur -U' + alias pare='pacaur -R' + alias parem='pacaur -Rns' + alias parep='pacaur -Si' + alias pareps='pacaur -Ss' + alias paloc='pacaur -Qi' + alias palocs='pacaur -Qs' + alias palst='pacaur -Qe' + alias paorph='pacaur -Qtd' + alias painsd='pacaur -S --asdeps' + alias pamir='pacaur -Syy' + alias paupd="pacaur -Sy$abs_aur" + alias upgrade='pacaur -Syu' +fi + +if (( $+commands[trizen] )); then + alias trconf='trizen -C' + alias trupg='trizen -Syua' + alias trsu='trizen -Syua --noconfirm' + alias trin='trizen -S' + alias trins='trizen -U' + alias trre='trizen -R' + alias trrem='trizen -Rns' + alias trrep='trizen -Si' + alias trreps='trizen -Ss' + alias trloc='trizen -Qi' + alias trlocs='trizen -Qs' + alias trlst='trizen -Qe' + alias trorph='trizen -Qtd' + alias trinsd='trizen -S --asdeps' + alias trmir='trizen -Syy' + alias trupd="trizen -Sy$abs_aur" + alias upgrade='trizen -Syu' +fi + +if (( $+commands[yaourt] )); then + alias yaconf='yaourt -C' + alias yaupg='yaourt -Syua' + alias yasu='yaourt -Syua --noconfirm' + alias yain='yaourt -S' + alias yains='yaourt -U' + alias yare='yaourt -R' + alias yarem='yaourt -Rns' + alias yarep='yaourt -Si' + alias yareps='yaourt -Ss' + alias yaloc='yaourt -Qi' + alias yalocs='yaourt -Qs' + alias yalst='yaourt -Qe' + alias yaorph='yaourt -Qtd' + alias yainsd='yaourt -S --asdeps' + alias yamir='yaourt -Syy' + alias yaupd="yaourt -Sy$abs_aur" + alias upgrade='yaourt -Syu' +fi + +if (( $+commands[yay] )); then + alias yaconf='yay -Pg' + alias yaupg='yay -Syu' + alias yasu='yay -Syu --noconfirm' + alias yain='yay -S' + alias yains='yay -U' + alias yare='yay -R' + alias yarem='yay -Rns' + alias yarep='yay -Si' + alias yareps='yay -Ss' + alias yaloc='yay -Qi' + alias yalocs='yay -Qs' + alias yalst='yay -Qe' + alias yaorph='yay -Qtd' + alias yainsd='yay -S --asdeps' + alias yamir='yay -Syy' + alias yaupd="yay -Sy$abs_aur" + alias upgrade='yay -Syu' +fi + +unset abs_aur -- cgit v1.2.3-70-g09d2 From 2e487b187eac96ac63c8bd0f5e3c28d5ed06d828 Mon Sep 17 00:00:00 2001 From: Septs Date: Tue, 6 Apr 2021 20:49:03 +0800 Subject: feat(shell-proxy): enable unexported `DEFAULT_PROXY` setting (#9774) --- plugins/shell-proxy/proxy.py | 5 +++-- plugins/shell-proxy/shell-proxy.plugin.zsh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/shell-proxy/proxy.py b/plugins/shell-proxy/proxy.py index d2e5361cb..97f4cf873 100755 --- a/plugins/shell-proxy/proxy.py +++ b/plugins/shell-proxy/proxy.py @@ -9,8 +9,9 @@ user_proxy = os.environ.get("CONFIG_PROXY", os.path.expandvars("$HOME/.config/pr def get_http_proxy(): - if "DEFAULT_PROXY" in os.environ: - return os.environ["DEFAULT_PROXY"] + default_proxy = os.environ.get("DEFAULT_PROXY") + if default_proxy: + return default_proxy if os.path.isfile(user_proxy): return check_output(user_proxy).decode("utf-8").strip() raise Exception("Not found, Proxy configuration") diff --git a/plugins/shell-proxy/shell-proxy.plugin.zsh b/plugins/shell-proxy/shell-proxy.plugin.zsh index fd0e2fe79..315ade665 100644 --- a/plugins/shell-proxy/shell-proxy.plugin.zsh +++ b/plugins/shell-proxy/shell-proxy.plugin.zsh @@ -4,7 +4,7 @@ __PROXY__="${0:A:h}/proxy.py" proxy() { - source <("$__PROXY__" "$1") + source <(env "DEFAULT_PROXY=$DEFAULT_PROXY" "$__PROXY__" "$1") } _proxy() { -- cgit v1.2.3-70-g09d2 From b94bdf8927935419a228a1ba21408a36125513f7 Mon Sep 17 00:00:00 2001 From: ratijas Date: Tue, 6 Apr 2021 15:51:40 +0300 Subject: feat(archlinux): add support for aura AUR helper (#9467) --- plugins/archlinux/README.md | 35 +++++++++++++++++++++++++++++++++- plugins/archlinux/archlinux.plugin.zsh | 29 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md index a4f191a5f..8dd191760 100644 --- a/plugins/archlinux/README.md +++ b/plugins/archlinux/README.md @@ -48,6 +48,38 @@ upgrades were available. Use `pacman -Que` instead. ### AUR helpers +#### Aura + +| Alias | Command | Description | +|---------|-------------------------------------------------|-------------------------------------------------------------------------| +| auin | `sudo aura -S` | Install packages from the repositories | +| aurin | `sudo aura -A` | Install packages from the repositories | +| auins | `sudo aura -U` | Install a package from a local file | +| auinsd | `sudo aura -S --asdeps` | Install packages as dependencies of another package (repositories only) | +| aurinsd | `sudo aura -A --asdeps` | Install packages as dependencies of another package (AUR only) | +| auloc | `aura -Qi` | Display information about a package in the local database | +| aulocs | `aura -Qs` | Search for packages in the local database | +| auls | `aura -Qql` | List all files owned by a given package | +| aulst | `aura -Qe` | List installed packages including from AUR (tagged as "local") | +| aumir | `sudo aura -Syy` | Force refresh of all package lists after updating mirrorlist | +| aurph | `sudo aura -Oj` | Remove orphans using aura | +| auown | `aura -Qqo` | Search for packages that own the specified file(s) | +| aure | `sudo aura -R` | Remove packages, keeping its settings and dependencies | +| aurem | `sudo aura -Rns` | Remove packages, including its settings and unneeded dependencies | +| aurep | `aura -Si` | Display information about a package in the repositories | +| aurrep | `aura -Ai` | Display information about a package from AUR | +| aureps | `aura -As --both` | Search for packages in the repositories and AUR | +| auras | `aura -As --both` | Same as above | +| auupd | `sudo aura -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| auupg | `sudo sh -c "aura -Syu && aura -Au"` | Sync with repositories before upgrading all packages (from AUR too) | +| ausu | `sudo sh -c "aura -Syu --no-confirm && aura -Au --no-confirm"` | Same as `auupg`, but without confirmation | +| upgrade[³](#f3) | `sudo aura -Syu` | Sync with repositories before upgrading packages | + +| Function | Description | +|-----------------|---------------------------------------------------------------------| +| auownloc _file_ | Display information about a package that owns the specified file(s) | +| auownls _file_ | List all files owned by a package that owns the specified file(s) | + #### Pacaur | Alias | Command | Description | @@ -152,7 +184,8 @@ whether the package manager is installed, checked in the following order: 2. `yaourt` 3. `trizen` 4. `pacaur` -5. `pacman` +5. `aura` +6. `pacman` ## Contributors diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index d53761077..4c553d271 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -91,6 +91,35 @@ fi # AUR helpers # ####################################### +if (( $+commands[aura] )); then + alias auin='sudo aura -S' + alias aurin='sudo aura -A' + alias auins='sudo aura -U' + alias auinsd='sudo aura -S --asdeps' + alias aurinsd='sudo aura -A --asdeps' + alias auloc='aura -Qi' + alias aulocs='aura -Qs' + alias aulst='aura -Qe' + alias aumir='sudo aura -Syy' + alias aurph='sudo aura -Oj' + alias aure='sudo aura -R' + alias aurem='sudo aura -Rns' + alias aurep='aura -Si' + alias aurrep='aura -Ai' + alias aureps='aura -As --both' + alias auras='aura -As --both' + alias auupd="sudo aura -Sy$abs_aur" + alias auupg='sudo sh -c "aura -Syu && aura -Au"' + alias ausu='sudo sh -c "aura -Syu --no-confirm && aura -Au --no-confirm"' + alias upgrade='sudo aura -Syu' + + # extra bonus specially for aura + alias auown="aura -Qqo" + alias auls="aura -Qql" + function auownloc() { aura -Qi $(aura -Qqo $@); } + function auownls () { aura -Qql $(aura -Qqo $@); } +fi + if (( $+commands[pacaur] )); then alias paupg='pacaur -Syu' alias pasu='pacaur -Syu --noconfirm' -- cgit v1.2.3-70-g09d2 From 1670f1cafcc919f35a2a52eaceeca315d293b679 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 6 Apr 2021 14:52:47 +0200 Subject: chore: add maintainer for archlinux plugin --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e307e4be8..1b1340554 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,5 @@ # Plugin owners +plugins/archlinux/ @ratijas plugins/aws/ @maksyms plugins/genpass/ @atoponce plugins/git-lfs/ @hellovietduc -- cgit v1.2.3-70-g09d2 From d5e9e8d37bd2556f154ec136f9c0dc206a52e35a Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 6 Apr 2021 22:11:02 +0200 Subject: docs: document commit convention in CONTRIBUTING.md --- CONTRIBUTING.md | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 111 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be67e93b0..b7db4f661 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,16 +11,23 @@ issues and pull requests. Please read them closely. Foremost, be so kind as to [search](#use-the-search-luke). This ensures any contribution you would make is not already covered. -* [Issues](#reporting-issues) - * [You have a problem](#you-have-a-problem) - * [You have a suggestion](#you-have-a-suggestion) -* [Pull Requests](#submitting-pull-requests) - * [Getting started](#getting-started) - * [You have a solution](#you-have-a-solution) - * [You have an addition](#you-have-an-addition) -* [Information sources (_aka_ search)](#use-the-search-luke) - -**BONUS:** [Volunteering](#you-have-spare-time-to-volunteer) + + +- [CONTRIBUTING GUIDELINES](#contributing-guidelines) + - [Reporting Issues](#reporting-issues) + - [You have a problem](#you-have-a-problem) + - [You have a suggestion](#you-have-a-suggestion) + - [Submitting Pull Requests](#submitting-pull-requests) + - [Getting started](#getting-started) + - [You have a solution](#you-have-a-solution) + - [You have an addition](#you-have-an-addition) + - [Use the Search, Luke](#use-the-search-luke) + - [Commit Guidelines](#commit-guidelines) + - [Format](#format) + - [Style](#style) + - [Volunteer](#volunteer) + + ## Reporting Issues @@ -117,7 +124,100 @@ and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-reque ---- -### You have spare time to volunteer +## Commit Guidelines + +Oh My Zsh uses the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) +specification. The automatic changelog tool uses these to automatically generate +a changelog based on the commit messages. Here's a guide to writing a commit message +to allow this: + +### Format + +``` +type(scope)!: subject +``` + +- `type`: the type of the commit is one of the following: + + - `feat`: new features. + - `fix`: bug fixes. + - `docs`: documentation changes. + - `refactor`: refactor of a particular code section without introducing + new features or bug fixes. + - `style`: code style improvements. + - `perf`: performance improvements. + - `test`: changes to the test suite. + - `ci`: changes to the CI system. + - `build`: changes to the build system (we don't yet have one so this shouldn't apply). + - `chore`: for other changes that don't match previous types. This doesn't appear + in the changelog. + +- `scope`: section of the codebase that the commit makes changes to. If it makes changes to + many sections, or if no section in particular is modified, leave blank without the parentheses. + Examples: + + - Commit that changes the `git` plugin: + ``` + feat(git): add alias for `git commit` + ``` + + - Commit that changes many plugins: + ``` + style: fix inline declaration of arrays + ``` + + For changes to plugins or themes, the scope should be the plugin or theme name: + + - ✅ `fix(agnoster): commit subject` + - ❌ `fix(theme/agnoster): commit subject` + +- `!`: this goes after the `scope` (or the `type` if scope is empty), to indicate that the commit + introduces breaking changes. + + Optionally, you can specify a message that the changelog tool will display to the user to indicate + what's changed and what they can do to deal with it. You can use multiple lines to type this message; + the changelog parser will keep reading until the end of the commit message or until it finds an empty + line. + + Example (made up): + + ``` + style(agnoster)!: change dirty git repo glyph + + BREAKING CHANGE: the glyph to indicate when a git repository is dirty has + changed from a Powerline character to a standard UTF-8 emoji. You can + change it back by setting `ZSH_THEME_DIRTY_GLYPH`. + + Fixes #420 + + Co-authored-by: Username + ``` + +- `subject`: a brief description of the changes. This will be displayed in the changelog. If you need + to specify other details you can use the commit body but it won't be visible. + + Formatting tricks: the commit subject may contain: + + - Links to related issues or PRs by writing `#issue`. This will be highlighted by the changelog tool: + ``` + feat(archlinux): add support for aura AUR helper (#9467) + ``` + + - Formatted inline code by using backticks: the text inbetween backticks will also be highlighted by + the changelog tool: + ``` + feat(shell-proxy): enable unexported `DEFAULT_PROXY` setting (#9774) + ``` + +### Style + +Try to keep the first commit line short. This is harder to do using this commit style but try to be +concise and if you need more space, you can use the commit body. Try to make sure that the commit +subject is clear and precise enough that users will know what change by just looking at the changelog. + +---- + +## Volunteer Very nice!! :) -- cgit v1.2.3-70-g09d2 From 7da330f1bd1690e821b438b6dd4cb54cc17f3b02 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 6 Apr 2021 22:14:05 +0200 Subject: chore: fix CONTRIBUTING.md TOC --- CONTRIBUTING.md | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7db4f661..16393da58 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,22 +11,16 @@ issues and pull requests. Please read them closely. Foremost, be so kind as to [search](#use-the-search-luke). This ensures any contribution you would make is not already covered. - - -- [CONTRIBUTING GUIDELINES](#contributing-guidelines) - - [Reporting Issues](#reporting-issues) - - [You have a problem](#you-have-a-problem) - - [You have a suggestion](#you-have-a-suggestion) - - [Submitting Pull Requests](#submitting-pull-requests) - - [Getting started](#getting-started) - - [You have a solution](#you-have-a-solution) - - [You have an addition](#you-have-an-addition) - - [Use the Search, Luke](#use-the-search-luke) - - [Commit Guidelines](#commit-guidelines) - - [Format](#format) - - [Style](#style) - - [Volunteer](#volunteer) - + + +- [Reporting Issues](#reporting-issues) + - [You have a problem](#you-have-a-problem) + - [You have a suggestion](#you-have-a-suggestion) +- [Submitting Pull Requests](#submitting-pull-requests) + - [Getting started](#getting-started) + - [You have a solution](#you-have-a-solution) + - [You have an addition](#you-have-an-addition) +- [Use the Se ## Reporting Issues -- cgit v1.2.3-70-g09d2 From 74db9acdb9931996a54fd777c76393099d3dae1e Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 6 Apr 2021 22:17:17 +0200 Subject: chore: I'm dumb --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 16393da58..4903584ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,12 @@ you would make is not already covered. - [Getting started](#getting-started) - [You have a solution](#you-have-a-solution) - [You have an addition](#you-have-an-addition) -- [Use the Se +- [Use the Search, Luke](#use-the-search-luke) +- [Commit Guidelines](#commit-guidelines) + - [Format](#format) + - [Style](#style) +- [Volunteer](#volunteer) + ## Reporting Issues -- cgit v1.2.3-70-g09d2 From 615f9dd02b6b0c33c8c69e310fc049b4f89c7b26 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 6 Apr 2021 22:26:57 +0200 Subject: chore: direct support queries to Discussions --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + .github/ISSUE_TEMPLATE/config.yml | 3 +++ .github/ISSUE_TEMPLATE/support.md | 10 ---------- 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/support.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 611d8ebae..88a6b814d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,7 @@ --- name: Bug report about: Create a report to help us improve Oh My Zsh +labels: 'Bug' --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c6b4cef42..3ddd72a15 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: true contact_links: + - name: Support + url: https://github.com/ohmyzsh/ohmyzsh/discussions + about: Ask the community for support - name: Get help on Discord url: https://discord.gg/ohmyzsh about: Have a quick question? Join the Discord server and ask on the appropriate channel. diff --git a/.github/ISSUE_TEMPLATE/support.md b/.github/ISSUE_TEMPLATE/support.md deleted file mode 100644 index 8c4f08044..000000000 --- a/.github/ISSUE_TEMPLATE/support.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Support -about: Request support for any problem you're having with Oh My Zsh -labels: 'Support' - ---- - -1. Look for similar issues already posted (including closed ones) -2. Include as much relevant information as possible -3. Try to make sure the issue is due to Oh My Zsh -- cgit v1.2.3-70-g09d2 From 3f50482674c2b3153590a4aba92fbfa1c01bc583 Mon Sep 17 00:00:00 2001 From: ilter <37029827+ilter@users.noreply.github.com> Date: Wed, 7 Apr 2021 20:53:48 +0300 Subject: feat(react-native): add aliases for iPhone 12 (#9792) --- plugins/react-native/react-native.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh index b33dedfed..8323c27bd 100644 --- a/plugins/react-native/react-native.plugin.zsh +++ b/plugins/react-native/react-native.plugin.zsh @@ -27,6 +27,9 @@ alias rniosxr='react-native run-ios --simulator "iPhone Xʀ"' alias rnios11='react-native run-ios --simulator "iPhone 11"' alias rnios11p='react-native run-ios --simulator "iPhone 11 Pro"' alias rnios11pm='react-native run-ios --simulator "iPhone 11 Pro Max"' +alias rnios12='react-native run-ios --simulator "iPhone 12"' +alias rnios12p='react-native run-ios --simulator "iPhone 12 Pro"' +alias rnios12pm='react-native run-ios --simulator "iPhone 12 Pro Max"' # iPad -- cgit v1.2.3-70-g09d2 From 9f8801bea6120817bc4f03f9d80dc1230ea7b2b0 Mon Sep 17 00:00:00 2001 From: "Jeff M. Hubbard" Date: Fri, 9 Apr 2021 13:48:24 -0500 Subject: feat(archlinux)!: remove deprecated commands `aur` and `abs` (#9803) BREAKING CHANGE: the various update aliases will no longer run `abs` and `aur`, which are either deprecated or nonexistent. See https://archlinux.org/news/deprecation-of-abs/ for more. --- plugins/archlinux/README.md | 35 ++++++++++++++++------------------ plugins/archlinux/archlinux.plugin.zsh | 19 ++++++------------ 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md index 8dd191760..d6b41ee40 100644 --- a/plugins/archlinux/README.md +++ b/plugins/archlinux/README.md @@ -26,13 +26,13 @@ plugins=(... archlinux) | pacrep | `pacman -Si` | Display information about a package in the repositories | | pacreps | `pacman -Ss` | Search for packages in the repositories | | pacrmorphans | `sudo pacman -Rs $(pacman -Qtdq)` | Delete all orphaned packages | -| pacupd | `sudo pacman -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| pacupd | `sudo pacman -Sy` | Update and refresh local package, ABS and AUR databases | | pacupg | `sudo pacman -Syu` | Sync with repositories before upgrading packages | | pacfileupg | `sudo pacman -Fy` | Download fresh package databases from the server | | pacfiles | `pacman -F` | Search package file names for matching strings | | pacls | `pacman -Ql` | List files in a package | | pacown | `pacman -Qo` | Show which package owns a file | -| upgrade[³](#f3) | `sudo pacman -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `sudo pacman -Syu` | Sync with repositories before upgrading packages | | Function | Description | |----------------|-----------------------------------------------------------| @@ -70,10 +70,10 @@ upgrades were available. Use `pacman -Que` instead. | aurrep | `aura -Ai` | Display information about a package from AUR | | aureps | `aura -As --both` | Search for packages in the repositories and AUR | | auras | `aura -As --both` | Same as above | -| auupd | `sudo aura -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| auupd | `sudo aura -Sy` | Update and refresh local package, ABS and AUR databases | | auupg | `sudo sh -c "aura -Syu && aura -Au"` | Sync with repositories before upgrading all packages (from AUR too) | | ausu | `sudo sh -c "aura -Syu --no-confirm && aura -Au --no-confirm"` | Same as `auupg`, but without confirmation | -| upgrade[³](#f3) | `sudo aura -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `sudo aura -Syu` | Sync with repositories before upgrading packages | | Function | Description | |-----------------|---------------------------------------------------------------------| @@ -96,10 +96,10 @@ upgrades were available. Use `pacman -Que` instead. | parem | `pacaur -Rns` | Remove packages, including its settings and unneeded dependencies | | parep | `pacaur -Si` | Display information about a package in the repositories | | pareps | `pacaur -Ss` | Search for packages in the repositories | -| paupd | `pacaur -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| paupd | `pacaur -Sy` | Update and refresh local package, ABS and AUR databases | | paupg | `pacaur -Syua` | Sync with repositories before upgrading all packages (from AUR too) | | pasu | `pacaur -Syua --no-confirm` | Same as `paupg`, but without confirmation | -| upgrade[³](#f3) | `pacaur -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `pacaur -Syu` | Sync with repositories before upgrading packages | #### Trizen @@ -118,12 +118,12 @@ upgrades were available. Use `pacman -Que` instead. | trrem | `trizen -Rns` | Remove packages, including its settings and unneeded dependencies | | trrep | `trizen -Si` | Display information about a package in the repositories | | trreps | `trizen -Ss` | Search for packages in the repositories | -| trupd | `trizen -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| trupd | `trizen -Sy` | Update and refresh local package, ABS and AUR databases | | trupg | `trizen -Syua` | Sync with repositories before upgrading all packages (from AUR too) | | trsu | `trizen -Syua --no-confirm` | Same as `trupg`, but without confirmation | -| upgrade[³](#f3) | `trizen -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `trizen -Syu` | Sync with repositories before upgrading packages | -#### Yaourt[²](#f2) +#### Yaourt[¹](#f1) | Alias | Command | Description | |---------|-----------------------------------|---------------------------------------------------------------------| @@ -140,12 +140,12 @@ upgrades were available. Use `pacman -Que` instead. | yarem | `yaourt -Rns` | Remove packages, including its settings and unneeded dependencies | | yarep | `yaourt -Si` | Display information about a package in the repositories | | yareps | `yaourt -Ss` | Search for packages in the repositories | -| yaupd | `yaourt -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| yaupd | `yaourt -Sy` | Update and refresh local package, ABS and AUR databases | | yaupg | `yaourt -Syua` | Sync with repositories before upgrading all packages (from AUR too) | | yasu | `yaourt -Syua --no-confirm` | Same as `yaupg`, but without confirmation | -| upgrade[³](#f3) | `yaourt -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `yaourt -Syu` | Sync with repositories before upgrading packages | -#### Yay[²](#f2) +#### Yay[¹](#f1) | Alias | Command | Description | |---------|--------------------------------|-------------------------------------------------------------------| @@ -162,21 +162,17 @@ upgrades were available. Use `pacman -Que` instead. | yarem | `yay -Rns` | Remove packages, including its settings and unneeded dependencies | | yarep | `yay -Si` | Display information about a package in the repositories | | yareps | `yay -Ss` | Search for packages in the repositories | -| yaupd | `yay -Sy && `[¹](#f1) | Update and refresh local package, ABS and AUR databases | +| yaupd | `yay -Sy` | Update and refresh local package, ABS and AUR databases | | yaupg | `yay -Syu` | Sync with repositories before upgrading packages | | yasu | `yay -Syu --no-confirm` | Same as `yaupg`, but without confirmation | -| upgrade[³](#f3) | `yay -Syu` | Sync with repositories before upgrading packages | +| upgrade[²](#f2) | `yay -Syu` | Sync with repositories before upgrading packages | --- ¹ -If the `abs` and/or `aur` commands are present, `sudo abs` and `sudo aur` are also -called to update the ABS and AUR databases. - -² Yay and Yaourt aliases overlap. If both are installed, yay will take precedence. -³ +² The `upgrade` alias is set for all package managers. Its value will depend on whether the package manager is installed, checked in the following order: @@ -199,3 +195,4 @@ whether the package manager is installed, checked in the following order: - MatthR3D - matthr3d@gmail.com - ornicar - thibault.duplessis@gmail.com - Ybalrid (Arthur Brainville) - ybalrid@ybalrid.info +- Jeff M. Hubbard - jeffmhubbard@gmail.com diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 4c553d271..c94fb8f6c 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -2,12 +2,6 @@ # Pacman # ####################################### -# abs and aur command check -local abs_aur='' -(( ! $+commands[abs] )) || abs_aur+=' && sudo abs' -(( ! $+commands[aur] )) || abs_aur+=' && sudo aur' - - # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips alias pacupg='sudo pacman -Syu' alias pacin='sudo pacman -S' @@ -26,7 +20,7 @@ alias pacfileupg='sudo pacman -Fy' alias pacfiles='pacman -F' alias pacls='pacman -Ql' alias pacown='pacman -Qo' -alias pacupd="sudo pacman -Sy$abs_aur" +alias pacupd="sudo pacman -Sy" alias upgrade='sudo pacman -Syu' function paclist() { @@ -108,7 +102,7 @@ if (( $+commands[aura] )); then alias aurrep='aura -Ai' alias aureps='aura -As --both' alias auras='aura -As --both' - alias auupd="sudo aura -Sy$abs_aur" + alias auupd="sudo aura -Sy" alias auupg='sudo sh -c "aura -Syu && aura -Au"' alias ausu='sudo sh -c "aura -Syu --no-confirm && aura -Au --no-confirm"' alias upgrade='sudo aura -Syu' @@ -135,7 +129,7 @@ if (( $+commands[pacaur] )); then alias paorph='pacaur -Qtd' alias painsd='pacaur -S --asdeps' alias pamir='pacaur -Syy' - alias paupd="pacaur -Sy$abs_aur" + alias paupd="pacaur -Sy" alias upgrade='pacaur -Syu' fi @@ -155,7 +149,7 @@ if (( $+commands[trizen] )); then alias trorph='trizen -Qtd' alias trinsd='trizen -S --asdeps' alias trmir='trizen -Syy' - alias trupd="trizen -Sy$abs_aur" + alias trupd="trizen -Sy" alias upgrade='trizen -Syu' fi @@ -175,7 +169,7 @@ if (( $+commands[yaourt] )); then alias yaorph='yaourt -Qtd' alias yainsd='yaourt -S --asdeps' alias yamir='yaourt -Syy' - alias yaupd="yaourt -Sy$abs_aur" + alias yaupd="yaourt -Sy" alias upgrade='yaourt -Syu' fi @@ -195,8 +189,7 @@ if (( $+commands[yay] )); then alias yaorph='yay -Qtd' alias yainsd='yay -S --asdeps' alias yamir='yay -Syy' - alias yaupd="yay -Sy$abs_aur" + alias yaupd="yay -Sy" alias upgrade='yay -Syu' fi -unset abs_aur -- cgit v1.2.3-70-g09d2 From 8b55fb3b60e885934745b03d8fd550c6eaa82121 Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Thu, 8 Apr 2021 13:59:57 +0800 Subject: feat(command-not-found): add support for Homebrew on Apple M1 (#9797) --- plugins/command-not-found/command-not-found.plugin.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index aea1e1b4c..10f3a6277 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -38,10 +38,13 @@ if [ -f /usr/libexec/pk-command-not-found ]; then } fi -# OSX command-not-found support +# macOS command-not-found support # https://github.com/Homebrew/homebrew-command-not-found -if [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then - source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' +HB_CNF_HANDLER_SUFFIX="Library/Taps/homebrew/homebrew-command-not-found/handler.sh" +if [[ -s "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then + source "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX" +elif [[ -s "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then + source "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX" fi # NixOS command-not-found support -- cgit v1.2.3-70-g09d2 From b54a6dab9cc9db9196aae5d8bc53ac3956855ecf Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 9 Apr 2021 21:21:57 +0200 Subject: refactor(command-not-found): clean up and reorganize logic --- .../command-not-found/command-not-found.plugin.zsh | 94 +++++++++++----------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 10f3a6277..8fdc8a647 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -1,55 +1,55 @@ -# Uses the command-not-found package zsh support -# as seen in https://www.porcheron.info/command-not-found-for-zsh/ -# this is installed in Ubuntu +## Platforms with a built-in command-not-found handler init file + +for file ( + # Arch Linux. Must have pkgfile installed: https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found + /usr/share/doc/pkgfile/command-not-found.zsh + # macOS (M1 and classic Homebrew): https://github.com/Homebrew/homebrew-command-not-found + /opt/homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh + /usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh +); do + if [[ -r "$file" ]]; then + source "$file" + unset file + return 0 + fi +done +unset file -if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then - function command_not_found_handler { - # check because c-n-f could've been removed in the meantime - if [ -x /usr/lib/command-not-found ]; then - /usr/lib/command-not-found -- "$1" - return $? - elif [ -x /usr/share/command-not-found/command-not-found ]; then - /usr/share/command-not-found/command-not-found -- "$1" - return $? - else - printf "zsh: command not found: %s\n" "$1" >&2 - return 127 - fi - return 0 - } -fi -# Arch Linux command-not-found support, you must have package pkgfile installed -# https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook -[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh +## Platforms with manual command_not_found_handler() setup -# Fedora command-not-found support -if [ -f /usr/libexec/pk-command-not-found ]; then - command_not_found_handler() { - runcnf=1 - retval=127 - [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0 - [ ! -x /usr/libexec/packagekitd ] && runcnf=0 - if [ $runcnf -eq 1 ]; then - /usr/libexec/pk-command-not-found $@ - retval=$? - fi - return $retval - } +# Debian and derivatives: https://launchpad.net/ubuntu/+source/command-not-found +if [[ -x /usr/lib/command-not-found || -x /usr/share/command-not-found/command-not-found ]]; then + command_not_found_handler() { + if [[ -x /usr/lib/command-not-found ]]; then + /usr/lib/command-not-found -- "$1" + return $? + elif [[ -x /usr/share/command-not-found/command-not-found ]]; then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "zsh: command not found: %s\n" "$1" >&2 + return 127 + fi + } fi -# macOS command-not-found support -# https://github.com/Homebrew/homebrew-command-not-found -HB_CNF_HANDLER_SUFFIX="Library/Taps/homebrew/homebrew-command-not-found/handler.sh" -if [[ -s "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then - source "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX" -elif [[ -s "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then - source "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX" +# Fedora: https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound +if [[ -x /usr/libexec/pk-command-not-found ]]; then + command_not_found_handler() { + if [[ -S /var/run/dbus/system_bus_socket && -x /usr/libexec/packagekitd ]]; then + /usr/libexec/pk-command-not-found -- "$@" + return $? + fi + + printf "zsh: command not found: %s\n" "$1" >&2 + return 127 + } fi -# NixOS command-not-found support -if [ -x /run/current-system/sw/bin/command-not-found ]; then - command_not_found_handler() { - /run/current-system/sw/bin/command-not-found $@ - } +# NixOS: https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found +if [[ -x /run/current-system/sw/bin/command-not-found ]]; then + command_not_found_handler() { + /run/current-system/sw/bin/command-not-found -- "$@" + } fi -- cgit v1.2.3-70-g09d2 From 6ae78695efa8c222d716db267041f3ad19114d98 Mon Sep 17 00:00:00 2001 From: Mario A Date: Sun, 14 Feb 2021 14:44:59 +0100 Subject: feat(command-not-found): add support for Termux (#9666) --- plugins/command-not-found/README.md | 1 + plugins/command-not-found/command-not-found.plugin.zsh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md index 1cf4ba66e..f267f0c89 100644 --- a/plugins/command-not-found/README.md +++ b/plugins/command-not-found/README.md @@ -28,5 +28,6 @@ It works out of the box with the command-not-found packages for: - [macOS (Homebrew)](https://github.com/Homebrew/homebrew-command-not-found) - [Fedora](https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound) - [NixOS](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found) +- [Termux](https://github.com/termux/command-not-found) You can add support for other platforms by submitting a Pull Request. diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 8fdc8a647..cbf9a0a8e 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -53,3 +53,10 @@ if [[ -x /run/current-system/sw/bin/command-not-found ]]; then /run/current-system/sw/bin/command-not-found -- "$@" } fi + +# Termux: https://github.com/termux/command-not-found +if [[ -x /data/data/com.termux/files/usr/libexec/termux/command-not-found ]]; then + command_not_found_handler() { + /data/data/com.termux/files/usr/libexec/termux/command-not-found -- "$1" + } +fi -- cgit v1.2.3-70-g09d2 From e9f805a3ca87ebe184b0c544b5e656f50deb52e4 Mon Sep 17 00:00:00 2001 From: Chuck Date: Sun, 11 Apr 2021 10:20:11 -0400 Subject: docs(rails): reflect changes to aliases (#9809) --- plugins/rails/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/rails/README.md b/plugins/rails/README.md index 9fb1cecf1..efdb8f8ba 100644 --- a/plugins/rails/README.md +++ b/plugins/rails/README.md @@ -21,6 +21,8 @@ plugins=(... rails) | `rgen`| `rails generate` | Generate boilerplate code | | `rgm` | `rails generate migration` | Generate a db migration | | `rp` | `rails plugin` | Run a Rails plugin command | +| `rr` | `rails routes` | List all defined routes | +| `rrg` | `rails routes \| grep` | List and filter the defined routes | | `ru` | `rails runner` | Run Ruby code in the context of Rails | | `rs` | `rails server` | Launch a web server | | `rsd` | `rails server --debugger` | Launch a web server with debugger | @@ -43,8 +45,6 @@ plugins=(... rails) | `rdsl` | `rake db:schema:load` | Load the database schema | | `rlc` | `rake log:clear` | Clear Rails logs | | `rn` | `rake notes` | Search for notes (`FIXME`, `TODO`) in code comments | -| `rr` | `rake routes` | List all defined routes | -| `rrg` | `rake routes \| grep` | List and filter the defined routes | | `rt` | `rake test` | Run Rails tests | | `rmd` | `rake middleware` | Interact with Rails middlewares | | `rsts` | `rake stats` | Print code statistics | -- cgit v1.2.3-70-g09d2 From 12669f29f0843b8b980dd137f150a74511f88842 Mon Sep 17 00:00:00 2001 From: Thomas De Backer Date: Sun, 11 Apr 2021 19:40:27 +0200 Subject: fix(gentoo): fix tab color completion (#9810) This commit fixes an issue in the gentoo theme introduced in 3bb5e977. Due to incorrect line width calculations, colors are incorrectly applied when using tab. Fixes #9778 Signed-off-by: Thomas De Backer --- themes/gentoo.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme index ae3274022..e18bce890 100644 --- a/themes/gentoo.zsh-theme +++ b/themes/gentoo.zsh-theme @@ -25,4 +25,4 @@ gentoo_precmd() { autoload -U add-zsh-hook add-zsh-hook precmd gentoo_precmd -PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%(!.#.$)%{$reset_color%} ' +PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%(!.#.$)%k%b%f ' -- cgit v1.2.3-70-g09d2 From b3d1826a431028acdbbae1eb5242f5641da17788 Mon Sep 17 00:00:00 2001 From: Kirk <1652877+chenkirk@users.noreply.github.com> Date: Fri, 23 Apr 2021 06:22:18 -0700 Subject: feat(ys): add setting to hide dirty info in hg repositories (#8415) On large mercurial projects, using `hg status` to show dirty prompt causes significant delay. This commit checks a local hg config value of `oh-my-zsh.hide-dirty` to skip dirty check. Users who wish to skip dirty check can add this to their `.hg/hgrc` file. ``` [oh-my-zsh] hide-dirty = 1 ``` This config value uses the same naming as ones found for git, in file lib/git.zsh. --- themes/ys.zsh-theme | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 89d5355dc..95067060b 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -26,10 +26,12 @@ ys_hg_prompt_info() { if [ -d '.hg' ]; then echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}" echo -n $(hg branch 2>/dev/null) - if [ -n "$(hg status 2>/dev/null)" ]; then - echo -n "$YS_VCS_PROMPT_DIRTY" - else - echo -n "$YS_VCS_PROMPT_CLEAN" + if [[ "$(hg config oh-my-zsh.hide-dirty 2>/dev/null)" != "1" ]]; then + if [ -n "$(hg status 2>/dev/null)" ]; then + echo -n "$YS_VCS_PROMPT_DIRTY" + else + echo -n "$YS_VCS_PROMPT_CLEAN" + fi fi echo -n "$YS_VCS_PROMPT_SUFFIX" fi -- cgit v1.2.3-70-g09d2 From 0e5fed193edf0073fab5adaac61f7b912ea86060 Mon Sep 17 00:00:00 2001 From: MrAureliusR <41264289+MrAureliusR@users.noreply.github.com> Date: Fri, 23 Apr 2021 09:51:31 -0400 Subject: feat(ys): add virtualenv prompt info (#8453) --- themes/ys.zsh-theme | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 95067060b..303c898b4 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -37,6 +37,15 @@ ys_hg_prompt_info() { fi } +# Virtualenv +local venv_info='$(virtenv_prompt)' +YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}" +YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%" +virtenv_prompt() { + [[ -n ${VIRTUAL_ENV} ]] || return + echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}" +} + local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})" # Prompt format: @@ -57,6 +66,7 @@ PROMPT=" %{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\ ${hg_info}\ ${git_info}\ +${venv_info}\ \ %{$fg[white]%}[%*] $exit_code %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" -- cgit v1.2.3-70-g09d2 From 1916a31153ddf3e48d31e3a7193ed97eaf34097d Mon Sep 17 00:00:00 2001 From: Wolfgang Ladermann Date: Fri, 23 Apr 2021 16:23:26 +0200 Subject: feat(systemadmin): add IPv6 info to `geteip` command (#9856) --- plugins/systemadmin/systemadmin.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 08136abda..a77f0069b 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -131,7 +131,8 @@ d0() { # gather external ip address geteip() { - curl -s -S https://icanhazip.com + curl -s -S -4 https://icanhazip.com + curl -s -S -6 https://icanhazip.com } # determine local IP address(es) -- cgit v1.2.3-70-g09d2 From 48a3c2f32d1a4643db367eed4d6c53768c3847b1 Mon Sep 17 00:00:00 2001 From: Ian G Canino Date: Fri, 23 Apr 2021 14:28:42 -0400 Subject: feat(fzf): look in XDG compliant location (#9858) --- plugins/fzf/fzf.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 69ec1d411..a979fe222 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -7,6 +7,7 @@ function setup_using_base_dir() { fzfdirs=( "${HOME}/.fzf" "${HOME}/.nix-profile/share/fzf" + "${XDG_DATA_HOME:-$HOME/.local/share}/fzf" "/usr/local/opt/fzf" "/usr/share/fzf" "/usr/local/share/examples/fzf" -- cgit v1.2.3-70-g09d2 From 1cc15ca3c23ba1a2b5236432bc62eb652c98972d Mon Sep 17 00:00:00 2001 From: Mauro Porras <167700+mauroporras@users.noreply.github.com> Date: Sun, 25 Apr 2021 12:02:39 -0500 Subject: feat(npm): add alias for `npm i -f` (#8454) As documented in the README, `npm i -f` forces npm to install the specified packages from a remote package registry, even if local copies exist on disk caches. --- plugins/npm/README.md | 1 + plugins/npm/npm.plugin.zsh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins/npm/README.md b/plugins/npm/README.md index 0b1a2280f..bc627e56f 100644 --- a/plugins/npm/README.md +++ b/plugins/npm/README.md @@ -15,6 +15,7 @@ plugins=(... npm) | `npmg` | `npm i -g` | Install dependencies globally | | `npmS` | `npm i -S` | Install and save to dependencies in your package.json | | `npmD` | `npm i -D` | Install and save to dev-dependencies in your package.json | +| `npmF` | `npm i -f` | Force install from remote registries ignoring local cache | | `npmE` | `PATH="$(npm bin)":"$PATH"` | Run command from node_modules folder based on current directory | | `npmO` | `npm outdated` | Check which npm modules are outdated | | `npmV` | `npm -v` | Check package versions | diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 87c68f3fb..93de9cba3 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -27,6 +27,9 @@ alias npmS="npm i -S " # npmd is used by https://github.com/dominictarr/npmd alias npmD="npm i -D " +# Force npm to fetch remote resources even if a local copy exists on disk. +alias npmF='npm i -f' + # Execute command from node_modules folder based on current directory # i.e npmE gulp alias npmE='PATH="$(npm bin)":"$PATH"' -- cgit v1.2.3-70-g09d2 From 32532c149a90eb25710f94d207546501e83c161b Mon Sep 17 00:00:00 2001 From: Petr Rajtslegr Date: Sun, 25 Apr 2021 19:07:25 +0200 Subject: feat(npm): add alias for `npm update` (#9442) --- plugins/npm/README.md | 1 + plugins/npm/npm.plugin.zsh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins/npm/README.md b/plugins/npm/README.md index bc627e56f..d6bada38b 100644 --- a/plugins/npm/README.md +++ b/plugins/npm/README.md @@ -18,6 +18,7 @@ plugins=(... npm) | `npmF` | `npm i -f` | Force install from remote registries ignoring local cache | | `npmE` | `PATH="$(npm bin)":"$PATH"` | Run command from node_modules folder based on current directory | | `npmO` | `npm outdated` | Check which npm modules are outdated | +| `npmU` | `npm update` | Update all the packages listed to the latest version | | `npmV` | `npm -v` | Check package versions | | `npmL` | `npm list` | List installed packages | | `npmL0` | `npm ls --depth=0` | List top-level installed packages | diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 93de9cba3..23f627ccd 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -37,6 +37,9 @@ alias npmE='PATH="$(npm bin)":"$PATH"' # Check which npm modules are outdated alias npmO="npm outdated" +# Update all the packages listed to the latest version +alias npmU="npm update" + # Check package versions alias npmV="npm -v" -- cgit v1.2.3-70-g09d2 From 7ed8888c5bc58827a5b8cf9e8347829613bd3683 Mon Sep 17 00:00:00 2001 From: Sherwin Heydarbeygi Date: Sun, 25 Apr 2021 10:08:51 -0700 Subject: feat(npm): add aliases for `npm search` and `npm info` (#9365) --- plugins/npm/README.md | 2 ++ plugins/npm/npm.plugin.zsh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/plugins/npm/README.md b/plugins/npm/README.md index d6bada38b..47d153619 100644 --- a/plugins/npm/README.md +++ b/plugins/npm/README.md @@ -27,3 +27,5 @@ plugins=(... npm) | `npmR` | `npm run` | Run npm scripts | | `npmP` | `npm publish` | Run npm publish | | `npmI` | `npm init` | Run npm init | +| `npmi` | `npm info` | Run npm info | +| `npmSe` | `npm search` | Run npm search | diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 23f627ccd..f7d6d3939 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -63,3 +63,9 @@ alias npmP="npm publish" # Run npm init alias npmI="npm init" + +# Run npm info +alias npmi="npm info" + +# Run npm search +alias npmSe="npm search" -- cgit v1.2.3-70-g09d2 From 6cc12e031ea8744a0dedb3c25ba3d73fe062772d Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Sun, 25 Apr 2021 19:14:05 +0200 Subject: feat(plugins): add plugin for `deno` (#9847) Co-authored-by: Kapil Pau Co-authored-by: CallMeLaNN --- plugins/deno/.gitignore | 1 + plugins/deno/README.md | 18 ++++++++++++++++++ plugins/deno/deno.plugin.zsh | 21 +++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 plugins/deno/.gitignore create mode 100644 plugins/deno/README.md create mode 100644 plugins/deno/deno.plugin.zsh diff --git a/plugins/deno/.gitignore b/plugins/deno/.gitignore new file mode 100644 index 000000000..cba5b03e8 --- /dev/null +++ b/plugins/deno/.gitignore @@ -0,0 +1 @@ +_deno diff --git a/plugins/deno/README.md b/plugins/deno/README.md new file mode 100644 index 000000000..828e6af39 --- /dev/null +++ b/plugins/deno/README.md @@ -0,0 +1,18 @@ +# Deno Plugin + +This plugin sets up completion and aliases for [Deno](https://deno.land). + +## Aliases + +| Alias | Full command | +| ----- | ---------------- | +| db | deno bundle | +| dc | deno compile | +| dca | deno cache | +| dfmt | deno fmt | +| dh | deno help | +| dli | deno lint | +| drn | deno run | +| drw | deno run --watch | +| dts | deno test | +| dup | deno upgrade | diff --git a/plugins/deno/deno.plugin.zsh b/plugins/deno/deno.plugin.zsh new file mode 100644 index 000000000..af5c98265 --- /dev/null +++ b/plugins/deno/deno.plugin.zsh @@ -0,0 +1,21 @@ +# ALIASES +alias db='deno bundle' +alias dc='deno compile' +alias dca='deno cache' +alias dfmt='deno fmt' +alias dh='deno help' +alias dli='deno lint' +alias drn='deno run' +alias drw='deno run --watch' +alias dts='deno test' +alias dup='deno upgrade' + +# COMPLETION FUNCTION +if (( $+commands[deno] )); then + if [[ ! -f $ZSH_CACHE_DIR/deno_version ]] \ + || [[ "$(deno --version)" != "$(< "$ZSH_CACHE_DIR/deno_version")" ]] \ + || [[ ! -f $ZSH/plugins/deno/_deno ]]; then + deno completions zsh > $ZSH/plugins/deno/_deno + deno --version > $ZSH_CACHE_DIR/deno_version + fi +fi -- cgit v1.2.3-70-g09d2 From 6a7285bc5bb69c255920950c45a911fdeca7f665 Mon Sep 17 00:00:00 2001 From: Piper Date: Sun, 25 Apr 2021 10:21:31 -0700 Subject: chore: fix "Facebook" typo in README.md (#9378) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86037f199..3ebea91e0 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ Thank you so much! We're on social media: - [@ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. You should follow it. -- [FaceBook](https://www.facebook.com/Oh-My-Zsh-296616263819290/) poke us. +- [Facebook](https://www.facebook.com/Oh-My-Zsh-296616263819290/) poke us. - [Instagram](https://www.instagram.com/_ohmyzsh/) tag us in your post showing Oh My Zsh! - [Discord](https://discord.gg/ohmyzsh) to chat with us! -- cgit v1.2.3-70-g09d2 From 0655241fa6b8d38ce2f2d43bb3289bdc2cad91c6 Mon Sep 17 00:00:00 2001 From: Eric Rodrigues Pires Date: Sun, 25 Apr 2021 14:56:59 -0300 Subject: fix(kubectl): use `--current` flag in `kcn` alias (#7605) --- plugins/kubectl/README.md | 2 +- plugins/kubectl/kubectl.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index 7a6cdaa59..8937b2b80 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -49,7 +49,7 @@ plugins=(... kubectl) | kdeli | `kubectl delete ingress` | Delete ingress resources matching passed argument | | | | **Namespace management** | | kgns | `kubectl get namespaces` | List the current namespaces in a cluster | -| kcn | `kubectl config set-context ...` | Change current namespace | +| kcn | `kubectl config set-context --current --namespace` | Change current namespace | | kens | `kubectl edit namespace` | Edit namespace resource from the default editor | | kdns | `kubectl describe namespace` | Describe namespace resource in detail | | kdelns | `kubectl delete namespace` | Delete the namespace. WARNING! This deletes everything in the namespace | diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index d509d8795..56135274f 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -71,7 +71,7 @@ alias kgns='kubectl get namespaces' alias kens='kubectl edit namespace' alias kdns='kubectl describe namespace' alias kdelns='kubectl delete namespace' -alias kcn='kubectl config set-context $(kubectl config current-context) --namespace' +alias kcn='kubectl config set-context --current --namespace' # ConfigMap management alias kgcm='kubectl get configmaps' -- cgit v1.2.3-70-g09d2 From 63a7422d8dd5eb93c849df0ab9e679e6f333818a Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Mon, 26 Apr 2021 11:54:53 +0200 Subject: fix(deno): actually load deno completion (#9863) --- plugins/deno/deno.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/deno/deno.plugin.zsh b/plugins/deno/deno.plugin.zsh index af5c98265..a37b3bec4 100644 --- a/plugins/deno/deno.plugin.zsh +++ b/plugins/deno/deno.plugin.zsh @@ -18,4 +18,6 @@ if (( $+commands[deno] )); then deno completions zsh > $ZSH/plugins/deno/_deno deno --version > $ZSH_CACHE_DIR/deno_version fi + autoload -Uz _deno + _comps[deno]=_deno fi -- cgit v1.2.3-70-g09d2