18 Commits
Author SHA1 Message Date
ca0904 4d4cfc287e fix(universalarchive): support 7zz and 7z for 7z archives (#14147) 2026-09-29 17:38:41 +02:00
Haakon Meihack 92bf53f1ae fix(emacs): do not emit ANSI escape codes in ghostel (#14145) 2026-09-29 11:23:20 +02:00
Chetan Agrawal 5c4bb4aec5 fix(extract): support 7zz and 7z for 7z archives (#14144) 2026-09-29 11:20:42 +02:00
nervo 868da9cfd5 fix(sops): correct completion command (#14139) 2026-09-29 08:13:36 +02:00
Martin Delille 83a0ec79ee feat(git): add aliases related to log, rebase and submodules (#9676)
* Add glom: git log --oneline --decorate --color $(git_main_branch)
* Add gsuri: git submodule update --recursive --init
* Add grbmi/grbmia: git rebase $(git_main_branch) --interactive / --autosquash
2026-09-28 13:22:49 +02:00
Robby RussellandCarlo Sala c5852b1101 refactor(github)!: deprecate legacy hub plugin (#14089)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2026-09-28 10:33:33 +02:00
nervo 68795c2170 feat(sops): introduce plugin (#14120) 2026-09-28 10:24:35 +02:00
Felix Bühler f809d46c10 fix(lib): protect omz_urlencode from global aliases (#14128) 2026-09-28 09:44:06 +02:00
Mingyang WuandCarlo Sala 0431f1c33d fix(emacs): create a frame for empty launcher invocations (#14091)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2026-09-28 09:41:06 +02:00
Kunal Gangakhedkar a3c88eba72 feat(git): add alias gsnut (#14124)
Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
2026-09-28 09:37:28 +02:00
dependabot[bot] 6881f37316 chore(deps): bump github/codeql-action/upload-sarif (#14135)
Bumps the gha-minor group with 1 update: [github/codeql-action/upload-sarif](https://github.com/github/codeql-action).


Updates `github/codeql-action/upload-sarif` from 4.38.0 to 4.38.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b96794f015dfd88f77b49b1c93e0fa7110f94c63...2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gha-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 09:11:58 +02:00
dependabot[bot] 1d66682636 chore(deps): bump idna (#14134)
Bumps the py-minor group in /.github/workflows/dependencies with 1 update: [idna](https://github.com/kjd/idna).


Updates `idna` from 3.19 to 3.20
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.19...v3.20)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.20'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: py-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-28 09:11:33 +02:00
ohmyzsh[bot] ce7f8c3224 chore(kube-ps1): update to 7aaaeee5 (#14133)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2026-09-28 09:11:09 +02:00
ohmyzsh[bot] f8e13d714e chore(gradle): update to 05693a01 (#14132)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2026-09-28 09:10:38 +02:00
Asanali 95ba6ae764 fix: hide temp completion files from $fpath (#14126)
Closes #14125
2026-09-27 23:26:18 +02:00
Fernando Araujo 74965c9609 feat(docker-compose): add dcv, dcsts and dci aliases (#14122) 2026-09-22 17:57:30 -07:00
Cedric Baaklini 1b2d741f19 feat(eza): add links, octal and inodes options (#14108) 2026-09-22 17:24:48 -07:00
Alexei Mironov 4ccc63333c feat(glab): add GitLab CLI completions (#14113)
Closes #13054
2026-09-22 17:23:21 -07:00
74 changed files with 340 additions and 173 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ dependencies:
plugins/gradle:
repo: gradle/gradle-completion
branch: master
version: e7c881dbef7462bc35ad05328397e1582fe25cb8
version: 05693a01fcb246bc4e8fc32a8d561dc537aaedf2
precopy: |
set -e
find . ! -name _gradle ! -name LICENSE -delete
@@ -30,7 +30,7 @@ dependencies:
plugins/kube-ps1:
repo: jonmosco/kube-ps1
branch: master
version: b4cd09ec8d4dc007173e28da40aeebf8eff8c87f
version: 7aaaeee5eaa29f920acd850ea63839d9f87b8ac5
precopy: |
set -e
find . ! -name kube-ps1.sh ! -name LICENSE ! -name README.md -delete
@@ -1,6 +1,6 @@
certifi==2026.7.22
charset-normalizer==3.5.1
idna==3.19
idna==3.20
PyYAML==6.0.3
requests==2.34.2
semver==3.1.0
+1 -1
View File
@@ -60,6 +60,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
with:
sarif_file: results.sarif
+2 -1
View File
@@ -178,7 +178,8 @@ function omz_urlencode() {
setopt norematchpcre
local -a opts
zparseopts -D -E -a opts r m P
# Quote the specs so global aliases (e.g. common-aliases' P) don't expand here
zparseopts -D -E -a opts 'r' 'm' 'P'
local in_str="$@"
local url_str=""
+2 -2
View File
@@ -11,8 +11,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_op"
zf_mv -f -- =( op completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._op"
zf_mv -f -- =( op completion zsh ) "$ZSH_CACHE_DIR/completions/_op"
} &|
# Load opswd function
+2 -2
View File
@@ -13,6 +13,6 @@ fi
# Generate and load arduino-cli completion
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_arduino-cli"
zf_mv -f -- =( arduino-cli completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._arduino-cli"
zf_mv -f -- =( arduino-cli completion zsh ) "$ZSH_CACHE_DIR/completions/_arduino-cli"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_argocd"
zf_mv -f -- =( argocd completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._argocd"
zf_mv -f -- =( argocd completion zsh ) "$ZSH_CACHE_DIR/completions/_argocd"
} &|
+2 -2
View File
@@ -14,6 +14,6 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_asdf" ]]; then
fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_asdf"
zf_mv -f -- =( asdf completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._asdf"
zf_mv -f -- =( asdf completion zsh ) "$ZSH_CACHE_DIR/completions/_asdf"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
# Generate and load buf completion
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_buf"
zf_mv -f -- =( buf completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._buf"
zf_mv -f -- =( buf completion zsh ) "$ZSH_CACHE_DIR/completions/_buf"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_bun"
zf_mv -f -- =( SHELL=zsh bun completions ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._bun"
zf_mv -f -- =( SHELL=zsh bun completions ) "$ZSH_CACHE_DIR/completions/_bun"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_charm"
zf_mv -f -- =( charm completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._charm"
zf_mv -f -- =( charm completion zsh ) "$ZSH_CACHE_DIR/completions/_charm"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_chezmoi"
zf_mv -f -- =( chezmoi completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._chezmoi"
zf_mv -f -- =( chezmoi completion zsh ) "$ZSH_CACHE_DIR/completions/_chezmoi"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_codex"
zf_mv -f -- =( codex completion zsh < /dev/null 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._codex"
zf_mv -f -- =( codex completion zsh < /dev/null 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_codex"
} &|
+2 -2
View File
@@ -27,6 +27,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_deno"
zf_mv -f -- =( deno completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._deno"
zf_mv -f -- =( deno completions zsh ) "$ZSH_CACHE_DIR/completions/_deno"
} &|
+4 -1
View File
@@ -17,7 +17,7 @@ plugins=(... docker-compose)
|-----------|----------------------------------|----------------------------------------------------------------------------------|
| dco | `docker-compose` | Docker-compose main command |
| dcb | `docker-compose build` | Build containers |
| dcc | `docker-compose config` | Parse, resolve and render compose file in canonical format |
| dcc | `docker-compose config` | Parse, resolve and render compose file in canonical format |
| dce | `docker-compose exec` | Execute command inside a container |
| dcps | `docker-compose ps` | List containers |
| dcrestart | `docker-compose restart` | Restart container |
@@ -35,3 +35,6 @@ plugins=(... docker-compose)
| dcpull | `docker-compose pull` | Pull image of a service |
| dcstart | `docker-compose start` | Start a container |
| dck | `docker-compose kill` | Kills containers |
| dcv | `docker-compose version` | Show version information |
| dcsts | `docker-compose stats` | Show stats of containers |
| dci | `docker-compose images` | List images |
@@ -24,5 +24,8 @@ alias dclF="$dccmd logs -f --tail 0"
alias dcpull="$dccmd pull"
alias dcstart="$dccmd start"
alias dck="$dccmd kill"
alias dcv="$dccmd version"
alias dcsts="$dccmd stats"
alias dci="$dccmd images"
unset dccmd
+2 -2
View File
@@ -68,7 +68,7 @@ zmodload -F zsh/files b:zf_mv
! is-at-least 23.0.0 ${${(s:,:z)"$(command docker --version)"}[3]}; then
command cp "${plugin_dir}/completions/_docker" "$ZSH_CACHE_DIR/completions/_docker"
else
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_docker"
zf_mv -f -- =( command docker completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._docker"
zf_mv -f -- =( command docker completion zsh ) "$ZSH_CACHE_DIR/completions/_docker"
fi
} "${0:A:h}" &|
+2 -2
View File
@@ -16,6 +16,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_doctl"
zf_mv -f -- =( doctl completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._doctl"
zf_mv -f -- =( doctl completion zsh ) "$ZSH_CACHE_DIR/completions/_doctl"
} &|
+2 -1
View File
@@ -35,7 +35,8 @@ alias eeval="$EMACS_PLUGIN_LAUNCHER --eval"
alias eframe='emacsclient --alternate-editor="" --create-frame'
# Emacs ANSI Term tracking
if [[ -n "$INSIDE_EMACS" ]] && [[ "$INSIDE_EMACS" != "vterm" ]]; then
local excluded_terms=(vterm ghostel)
if [[ -n "$INSIDE_EMACS" ]] && (( ! ${excluded_terms[(Ie)${INSIDE_EMACS%%,*}]} )); then
chpwd_emacs() { print -P "\033AnSiTc %d"; }
print -P "\033AnSiTc %d" # Track current working directory
print -P "\033AnSiTu %n" # Track username
+3 -2
View File
@@ -32,8 +32,9 @@ emacsfun() {
# Check if there are suitable frames
frames="$(emacsclient -a '' -n -e "$cmd" 2>/dev/null |sed 's/.*\x07//g' )"
# Only create another X frame if there isn't one present
if [ -z "$frames" -o "$frames" = nil ]; then
# A bare emacs/e passes only --no-wait, so it still needs --create-frame.
if [ -z "$frames" ] || [ "$frames" = nil ] || [ "$#" -eq 0 ] \
|| { [ "$#" -eq 1 ] && [ "$1" = --no-wait ]; }; then
emacsclient --alternate-editor="" --create-frame "$@"
return $?
fi
+11 -1
View File
@@ -119,7 +119,17 @@ EOF
fi ;;
(*.rpm)
rpm2cpio "$full_path" | cpio --quiet -id ;;
(*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;;
(*.7z | *.7z.[0-9]* | *.pk7)
if (( $+commands[7zz] )); then
7zz x "$full_path"
elif (( $+commands[7z] )); then
7z x "$full_path"
elif (( $+commands[7za] )); then
7za x "$full_path"
else
echo "extract: cannot extract 7z files: install 7zz, 7z or 7za" >&2
success=1
fi ;;
(*.deb)
command mkdir -p "control" "data"
ar vx "$full_path" > /dev/null
+30
View File
@@ -45,6 +45,36 @@ If `yes`, always add `-h` flag to add a header row for each column.
Default: `no`
### `links`
```zsh
zstyle ':omz:plugins:eza' 'links' yes|no
```
If `yes`, always add `-H` flag to show hard links for each file.
Default: `no`
### `octal`
```zsh
zstyle ':omz:plugins:eza' 'octal' yes|no
```
If `yes`, always add `-o` flag to show file permissions as octal numbers.
Default: `no`
### `inodes`
```zsh
zstyle ':omz:plugins:eza' 'inodes' yes|no
```
If `yes`, always add `-i` flag to show the inode for each file.
Default: `no`
### `show-group`
```zsh
+9
View File
@@ -21,6 +21,15 @@ function _configure_eza() {
if zstyle -t ':omz:plugins:eza' 'header'; then
_EZA_HEAD+=("h")
fi
if zstyle -t ':omz:plugins:eza' 'links'; then
_EZA_HEAD+=("H")
fi
if zstyle -t ':omz:plugins:eza' 'octal'; then
_EZA_HEAD+=("o")
fi
if zstyle -t ':omz:plugins:eza' 'inodes'; then
_EZA_HEAD+=("i")
fi
zstyle -s ':omz:plugins:eza' 'size-prefix' _val
case "${_val:l}" in
binary)
+2 -2
View File
@@ -32,6 +32,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_flutter"
zf_mv -f -- =( flutter zsh-completion < /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._flutter"
zf_mv -f -- =( flutter zsh-completion < /dev/null ) "$ZSH_CACHE_DIR/completions/_flutter"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_flux"
zf_mv -f -- =( flux completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._flux"
zf_mv -f -- =( flux completion zsh ) "$ZSH_CACHE_DIR/completions/_flux"
} &|
+2 -2
View File
@@ -12,8 +12,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_fnm"
zf_mv -f -- =( fnm completions --shell=zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._fnm"
zf_mv -f -- =( fnm completions --shell=zsh ) "$ZSH_CACHE_DIR/completions/_fnm"
} &|
if zstyle -t ':omz:plugins:fnm' autostart; then
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_gcx"
zf_mv -f -- =( gcx completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._gcx"
zf_mv -f -- =( gcx completion zsh ) "$ZSH_CACHE_DIR/completions/_gcx"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_gh"
zf_mv -f -- =( gh completion --shell zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._gh"
zf_mv -f -- =( gh completion --shell zsh ) "$ZSH_CACHE_DIR/completions/_gh"
} &|
+5
View File
@@ -108,6 +108,7 @@ plugins=(... git)
| `glo` | `git log --oneline --decorate` |
| `glog` | `git log --oneline --decorate --graph` |
| `gloga` | `git log --oneline --decorate --graph --all` |
| `glom` | `git log --oneline --decorate --color $(git_main_branch)..` |
| `glp` | `git log --pretty=<format>` |
| `glg` | `git log --stat` |
| `glgp` | `git log --stat --patch` |
@@ -155,6 +156,8 @@ plugins=(... git)
| `grba` | `git rebase --abort` |
| `grbc` | `git rebase --continue` |
| `grbi` | `git rebase --interactive` |
| `grbmi` | `git rebase $(git_main_branch) --interactive` |
| `grbmia` | `git rebase $(git_main_branch) --interactive --autosquash` |
| `grbo` | `git rebase --onto` |
| `grbs` | `git rebase --skip` |
| `grbd` | `git rebase $(git_develop_branch)` |
@@ -202,8 +205,10 @@ plugins=(... git)
| `gst` | `git status` |
| `gss` | `git status --short` |
| `gsb` | `git status --short -b` |
| `gsnut` | `git status --untracked-files=no` |
| `gsi` | `git submodule init` |
| `gsu` | `git submodule update` |
| `gsuri` | `git submodule update --recursive --init` |
| `gsd` | `git svn dcommit` |
| `git-svn-dcommit-push` | `git svn dcommit && git push github $(git_main_branch):svntrunk` |
| `gsr` | `git svn rebase` |
+5
View File
@@ -253,6 +253,7 @@ alias glolm='git log $(git_main_branch) --graph --pretty="%Cred%h%Creset -%C(aut
alias glo='git log --oneline --decorate'
alias glog='git log --oneline --decorate --graph'
alias gloga='git log --oneline --decorate --graph --all'
alias glom='git log --oneline --decorate --color $(git_main_branch)..'
# Pretty log messages
function _git_log_prettily(){
@@ -362,6 +363,8 @@ alias grbd='git rebase $(git_develop_branch)'
alias grbm='git rebase $(git_main_branch)'
alias grbom='git rebase origin/$(git_main_branch)'
alias grbum='git rebase upstream/$(git_main_branch)'
alias grbmi='git rebase $(git_main_branch) --interactive'
alias grbmia='git rebase $(git_main_branch) --interactive --autosquash'
alias grf='git reflog'
alias gr='git remote'
alias grv='git remote --verbose'
@@ -404,8 +407,10 @@ alias gsts='git stash show --patch'
alias gst='git status'
alias gss='git status --short'
alias gsb='git status --short --branch'
alias gsnut='git status --untracked-files=no'
alias gsi='git submodule init'
alias gsu='git submodule update'
alias gsuri='git submodule update --recursive --init'
alias gsd='git svn dcommit'
alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
alias gsr='git svn rebase'
+34 -36
View File
@@ -1,45 +1,43 @@
# github plugin
This plugin supports working with GitHub from the command line. It provides a few things:
> [!WARNING]
> This plugin is deprecated and will be removed in a future release. It supports
> the legacy [`hub`](https://github.com/mislav/hub) CLI, not the current GitHub
> CLI. For `gh` completion, use the [`gh` plugin](../gh) instead.
* Sets up the `hub` wrapper and completions for the `git` command if you have [`hub`](https://github.com/github/hub) installed.
* Completion for the [`github` Ruby gem](https://github.com/defunkt/github-gem).
* Convenience functions for working with repos and URLs.
The plugin provides compatibility for existing `hub` users by:
### Functions
- aliasing `git` to `hub` when `hub` is installed;
- adding completion for `hub`; and
- defining convenience functions for creating repositories.
* `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub
* `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub
* `exist_gh` - Takes an existing repo and pushes it to GitHub
## Migrating to GitHub CLI
## Installation
[Hub](https://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ.
The [`github` Ruby gem](https://github.com/defunkt/github-gem) needs to be installed if you want to use it.
### Configuration
These settings affect `github`'s behavior.
#### Environment variables
* `$GITHUB_USER`
* `$GITHUB_PASSWORD`
#### Git configuration options
* `github.user` - GitHub username for repo operations
See `man hub` for more details.
### Homebrew installation note
If you have installed `hub` using Homebrew, its completions may not be on your `$FPATH` if you are using the system `zsh`. Homebrew installs `zsh` completion definitions to `/usr/local/share/zsh/site-functions`, which will be on `$FPATH` for the Homebrew-installed `zsh`, but not for the system `zsh`. If you want it to work with the system `zsh`, add this to your `~/.zshrc` before it sources `oh-my-zsh.sh`.
Install [GitHub CLI](https://cli.github.com/), replace `github` with `gh` in
your plugin list, and restart your shell:
```zsh
if (( ! ${fpath[(I)/usr/local/share/zsh/site-functions]} )); then
FPATH=/usr/local/share/zsh/site-functions:$FPATH
fi
plugins=(... gh)
```
The `gh` plugin supplies completion for the installed GitHub CLI. It does not
alias `git`, because `gh` is not a Git wrapper.
The closest replacement for creating a GitHub repository from an existing
local repository is:
```zsh
gh repo create --source=. --push
```
## Deprecated functions
- `empty_gh` - creates a new repository with a `README.md` and pushes it to GitHub
- `new_gh` - initializes an existing directory and pushes it to GitHub
- `exist_gh` - pushes an existing Git repository to GitHub
These functions remain available during the deprecation period and require
`hub`. They will be removed with the plugin.
If you continue using `hub`, see its documentation for authentication and
configuration details.
+10 -7
View File
@@ -1,3 +1,6 @@
print -Pru2 -- '%F{yellow}[oh-my-zsh] The %Bgithub%b plugin is deprecated and will be removed in a future release.'
print -Pru2 -- 'It supports the legacy %Bhub%b CLI. Use the %Bgh%b plugin for GitHub CLI completion.%f'
# Set up hub wrapper for git, if it is available; https://github.com/github/hub
if (( $+commands[hub] )); then
alias git=hub
@@ -26,7 +29,7 @@ empty_gh() { # [NAME_OF_REPO]
# This function will add all non-hidden files to git.
new_gh() { # [DIRECTORY]
emulate -L zsh
local repo="$1"
local repo="${1-.}"
cd "$repo" \
|| return
@@ -42,7 +45,7 @@ new_gh() { # [DIRECTORY]
|| return
hub create \
|| return
git push -u origin master \
git push -u origin HEAD \
|| return
}
@@ -52,18 +55,19 @@ new_gh() { # [DIRECTORY]
# to your GitHub.
exist_gh() { # [DIRECTORY]
emulate -L zsh
local repo=$1
cd "$repo"
local repo="${1:-.}"
cd "$repo" \
|| return
hub create \
|| return
git push -u origin master
git push -u origin HEAD
}
# git.io "GitHub URL"
#
# Shorten GitHub url, example:
# https://github.com/nvogel/dotzsh > https://git.io/8nU25w
# https://github.com/nvogel/dotzsh > https://git.io/8nU25w
# source: https://github.com/nvogel/dotzsh
# documentation: https://github.com/blog/985-git-io-github-url-shortener
#
@@ -74,4 +78,3 @@ git.io() {
}
# End Functions #############################################################
+18
View File
@@ -0,0 +1,18 @@
# GitLab CLI plugin
This plugin adds completion for the [GitLab CLI](https://docs.gitlab.com/cli/).
To use it, add `glab` to the plugins array in your zshrc file:
```zsh
plugins=(... glab)
```
This plugin does not add any aliases.
## Cache
This plugin caches the completion script at `$ZSH_CACHE_DIR/completions/_glab`.
The cache is regenerated in the background whenever the plugin is loaded, which
usually happens when you start a new Zsh session.
+18
View File
@@ -0,0 +1,18 @@
# Autocompletion for the GitLab CLI (glab).
if (( ! $+commands[glab] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `glab`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_glab" ]]; then
typeset -g -A _comps
autoload -Uz _glab
_comps[glab]=_glab
fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._glab"
zf_mv -f -- =( glab completion -s zsh ) "$ZSH_CACHE_DIR/completions/_glab"
} &|
+4
View File
@@ -267,6 +267,7 @@ __gradle_subcommand() {
'-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn)' \
'-Dorg.gradle.configuration-cache.read-only=[]' \
'-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]' \
'-Dorg.gradle.configuration-cache.unsafe.skip-task-logging-listeners-serialization=[]' \
'-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]' \
'-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]' \
'-Dorg.gradle.console.interactive=[]' \
@@ -296,6 +297,7 @@ __gradle_subcommand() {
'-Dorg.gradle.jvmargs=[]' \
'-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug)' \
'-Dorg.gradle.logging.stacktrace=[]' \
'-Dorg.gradle.mirror.maven.settings=[]' \
'-Dorg.gradle.native=[]' \
'-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false)' \
'-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low)' \
@@ -407,6 +409,7 @@ _gradle() {
'-Dorg.gradle.configuration-cache.problems=[Configures how the configuration cache handles problems (fail or warn). Supported values are 'warn', or 'fail' (default).]:org.gradle.configuration cache.problems:(fail warn):->argument-expected' \
'-Dorg.gradle.configuration-cache.read-only=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache.unsafe.ignore.unsupported-build-events-listeners=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache.unsafe.skip-task-logging-listeners-serialization=[]:->argument-expected' \
'-Dorg.gradle.configuration-cache=[Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds.]:->argument-expected' \
'-Dorg.gradle.configureondemand=[Configures necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds.]:->argument-expected' \
'-Dorg.gradle.console.interactive=[]:->argument-expected' \
@@ -436,6 +439,7 @@ _gradle() {
'-Dorg.gradle.jvmargs=[]:->argument-expected' \
'-Dorg.gradle.logging.level=[]:org.gradle.logging.level:(quiet warn info debug):->argument-expected' \
'-Dorg.gradle.logging.stacktrace=[]:->argument-expected' \
'-Dorg.gradle.mirror.maven.settings=[]:->argument-expected' \
'-Dorg.gradle.native=[]:->argument-expected' \
'-Dorg.gradle.parallel=[Builds projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use.]:org.gradle.parallel:(true false):->argument-expected' \
'-Dorg.gradle.priority=[Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Supported values are 'normal' (default) or 'low'.]:org.gradle.priority:(normal low):->argument-expected' \
+2 -2
View File
@@ -11,7 +11,7 @@ else
source "$ZSH_CACHE_DIR/completions/_hasura"
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_hasura"
zf_mv -f -- =( hasura completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._hasura"
zf_mv -f -- =( hasura completion zsh ) "$ZSH_CACHE_DIR/completions/_hasura"
} &|
fi
+2 -2
View File
@@ -15,8 +15,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_hcloud"
zf_mv -f -- =( hcloud completion zsh 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._hcloud"
zf_mv -f -- =( hcloud completion zsh 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_hcloud"
} &|
# Main alias
+2 -2
View File
@@ -11,8 +11,8 @@ else
source "$ZSH_CACHE_DIR/completions/_helm"
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_helm"
zf_mv -f -- =( helm completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._helm"
zf_mv -f -- =( helm completion zsh ) "$ZSH_CACHE_DIR/completions/_helm"
} &|
fi
+2 -2
View File
@@ -63,6 +63,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_herdr"
zf_mv -f -- =( herdr completion zsh < /dev/null 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._herdr"
zf_mv -f -- =( herdr completion zsh < /dev/null 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_herdr"
} &|
+2 -2
View File
@@ -10,6 +10,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_hermes"
zf_mv -f -- =( hermes completion zsh < /dev/null 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._hermes"
zf_mv -f -- =( hermes completion zsh < /dev/null 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_hermes"
} &|
+2 -2
View File
@@ -13,8 +13,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_jj"
zf_mv -f -- =( COMPLETE=zsh jj ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._jj"
zf_mv -f -- =( COMPLETE=zsh jj ) "$ZSH_CACHE_DIR/completions/_jj"
} &|
function __jj_prompt_jj() {
+2 -2
View File
@@ -13,6 +13,6 @@ fi
# the actual completion file will be loaded.
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_k9s"
zf_mv -f -- =( k9s completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._k9s"
zf_mv -f -- =( k9s completion zsh ) "$ZSH_CACHE_DIR/completions/_k9s"
} &|
+2 -2
View File
@@ -13,8 +13,8 @@ fi
# Generate and load kind completion
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_kind"
zf_mv -f -- =( kind completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._kind"
zf_mv -f -- =( kind completion zsh ) "$ZSH_CACHE_DIR/completions/_kind"
} &|
# Register aliases
+39 -12
View File
@@ -39,6 +39,7 @@ KUBE_PS1_HIDE_IF_NOCONTEXT="${KUBE_PS1_HIDE_IF_NOCONTEXT:-false}"
_KUBE_PS1_KUBECONFIG_CACHE="${KUBECONFIG}"
_KUBE_PS1_DISABLE_PATH="${HOME}/.kube/kube-ps1/disabled"
_KUBE_PS1_LAST_TIME=0
_KUBE_PS1_HAS_CONTEXT=false
# Determine our shell
_kube_ps1_shell_type() {
@@ -264,15 +265,21 @@ _kube_ps1_prompt_update() {
[[ "${KUBE_PS1_ENABLED}" == "off" ]] && return $return_code
if ! _kube_ps1_binary_check "${KUBE_PS1_BINARY}"; then
# No ability to fetch context/namespace; display N/A.
# Unable to determine context availability; preserve the existing
# BINARY-N/A prompt instead of treating it as no context.
KUBE_PS1_CONTEXT="BINARY-N/A"
KUBE_PS1_NAMESPACE="N/A"
unset _KUBE_PS1_HAS_CONTEXT
# Refresh when the binary becomes available again.
_KUBE_PS1_LAST_TIME=0
return $return_code
fi
if [[ "${KUBECONFIG}" != "${_KUBE_PS1_KUBECONFIG_CACHE}" ]]; then
# User changed KUBECONFIG; unconditionally refetch.
_KUBE_PS1_KUBECONFIG_CACHE=${KUBECONFIG}
if [[ "${_KUBE_PS1_LAST_TIME}" == 0 ]] ||
[[ "${KUBECONFIG}" != "${_KUBE_PS1_KUBECONFIG_CACHE}" ]]; then
# Fetch initially, even if no config file exists, and whenever the
# user changes KUBECONFIG.
_KUBE_PS1_KUBECONFIG_CACHE="${KUBECONFIG}"
_kube_ps1_get_context_ns
return $return_code
fi
@@ -300,13 +307,30 @@ _kube_ps1_prompt_update() {
}
_kube_ps1_get_context() {
if [[ "${KUBE_PS1_CONTEXT_ENABLE}" == true ]]; then
KUBE_PS1_CONTEXT="$(${KUBE_PS1_BINARY} config current-context 2>/dev/null)"
KUBE_PS1_CONTEXT="${KUBE_PS1_CONTEXT:-N/A}"
local context
if [[ -n "${KUBE_PS1_CLUSTER_FUNCTION}" ]]; then
KUBE_PS1_CONTEXT="$("${KUBE_PS1_CLUSTER_FUNCTION}" "${KUBE_PS1_CONTEXT}")"
fi
# Context availability must be detected even when context display is
# disabled but KUBE_PS1_HIDE_IF_NOCONTEXT is enabled.
if [[ "${KUBE_PS1_CONTEXT_ENABLE}" != true ]] &&
[[ "${KUBE_PS1_HIDE_IF_NOCONTEXT}" != true ]]; then
KUBE_PS1_CONTEXT=
return
fi
context="$("${KUBE_PS1_BINARY}" config current-context 2>/dev/null)"
_KUBE_PS1_HAS_CONTEXT=false
[[ -n "${context}" ]] && _KUBE_PS1_HAS_CONTEXT=true
if [[ "${KUBE_PS1_CONTEXT_ENABLE}" != true ]]; then
KUBE_PS1_CONTEXT=
return
fi
KUBE_PS1_CONTEXT="${context:-N/A}"
if [[ -n "${KUBE_PS1_CLUSTER_FUNCTION}" ]]; then
KUBE_PS1_CONTEXT="$("${KUBE_PS1_CLUSTER_FUNCTION}" "${KUBE_PS1_CONTEXT}")"
fi
}
@@ -325,7 +349,7 @@ _kube_ps1_get_context_ns() {
# Set the command time
if [[ "${_KUBE_PS1_SHELL}" == "bash" ]]; then
if ((BASH_VERSINFO[0] > 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 2))); then
_KUBE_PS1_LAST_TIME=$(printf '%(%s)T')
printf -v _KUBE_PS1_LAST_TIME '%(%s)T' -1
else
_KUBE_PS1_LAST_TIME=$(date +%s)
fi
@@ -407,8 +431,11 @@ kubeoff() {
# Build our prompt
kube_ps1() {
[[ "${KUBE_PS1_ENABLED}" == "off" ]] && return
[[ "${KUBE_PS1_HIDE_IF_NOCONTEXT}" == true ]] &&
[[ "${_KUBE_PS1_HAS_CONTEXT}" == false ]] && return
[[ -z "${KUBE_PS1_CONTEXT}" ]] && [[ "${KUBE_PS1_CONTEXT_ENABLE}" == true ]] && return
[[ "${KUBE_PS1_CONTEXT}" == "N/A" ]] && [[ ${KUBE_PS1_HIDE_IF_NOCONTEXT} == true ]] && return
local KUBE_PS1
local KUBE_PS1_RESET_COLOR="${_KUBE_PS1_OPEN_ESC}${_KUBE_PS1_DEFAULT_FG}${_KUBE_PS1_CLOSE_ESC}"
+2 -2
View File
@@ -12,8 +12,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_kubectl"
zf_mv -f -- =( kubectl completion zsh 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._kubectl"
zf_mv -f -- =( kubectl completion zsh 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_kubectl"
} &|
# This command is used a LOT both below and in daily life
+2 -2
View File
@@ -12,6 +12,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_minikube"
zf_mv -f -- =( minikube completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._minikube"
zf_mv -f -- =( minikube completion zsh ) "$ZSH_CACHE_DIR/completions/_minikube"
} &|
+2 -2
View File
@@ -21,6 +21,6 @@ fi
# Generate and load mise completion
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_mise"
zf_mv -f -- =( mise completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._mise"
zf_mv -f -- =( mise completion zsh ) "$ZSH_CACHE_DIR/completions/_mise"
} &|
+2 -2
View File
@@ -13,8 +13,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_molecule"
zf_mv -f -- =( _MOLECULE_COMPLETE=zsh_source molecule ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._molecule"
zf_mv -f -- =( _MOLECULE_COMPLETE=zsh_source molecule ) "$ZSH_CACHE_DIR/completions/_molecule"
} &|
# Alias
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_atlas"
zf_mv -f -- =( atlas completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._atlas"
zf_mv -f -- =( atlas completion zsh ) "$ZSH_CACHE_DIR/completions/_atlas"
} &|
+4 -4
View File
@@ -9,8 +9,8 @@ if (( $+commands[nsc] )); then
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_nsc"
zf_mv -f -- =( nsc completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._nsc"
zf_mv -f -- =( nsc completion zsh ) "$ZSH_CACHE_DIR/completions/_nsc"
} &|
fi
@@ -25,7 +25,7 @@ if (( $+commands[nats] )); then
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_nats"
zf_mv -f -- =( nats --completion-script-zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._nats"
zf_mv -f -- =( nats --completion-script-zsh ) "$ZSH_CACHE_DIR/completions/_nats"
} &|
fi
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_ngrok"
zf_mv -f -- =( ngrok completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._ngrok"
zf_mv -f -- =( ngrok completion zsh ) "$ZSH_CACHE_DIR/completions/_ngrok"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_pass-cli"
zf_mv -f -- =( pass-cli completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._pass-cli"
zf_mv -f -- =( pass-cli completions zsh ) "$ZSH_CACHE_DIR/completions/_pass-cli"
} &|
+2 -2
View File
@@ -45,8 +45,8 @@ else
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_pipenv"
zf_mv -f -- =( _PIPENV_COMPLETE=zsh_source pipenv ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._pipenv"
zf_mv -f -- =( _PIPENV_COMPLETE=zsh_source pipenv ) "$ZSH_CACHE_DIR/completions/_pipenv"
} &|
fi
+2 -2
View File
@@ -12,8 +12,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_podman"
zf_mv -f -- =( podman completion zsh 2> /dev/null ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._podman"
zf_mv -f -- =( podman completion zsh 2> /dev/null ) "$ZSH_CACHE_DIR/completions/_podman"
} &|
alias pbl='podman build'
+2 -2
View File
@@ -41,6 +41,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_poetry"
zf_mv -f -- =( poetry completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._poetry"
zf_mv -f -- =( poetry completions zsh ) "$ZSH_CACHE_DIR/completions/_poetry"
} &|
+2 -2
View File
@@ -12,7 +12,7 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_procs"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._procs"
autoload -Uz is-at-least
local _version=$(procs --version)
zf_mv -f -- =(
@@ -21,5 +21,5 @@ zmodload -F zsh/files b:zf_mv
else
procs --completion-out zsh
fi
) "$TMPPREFIX"
) "$ZSH_CACHE_DIR/completions/_procs"
} &|
+2 -2
View File
@@ -12,8 +12,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_pulumi"
zf_mv -f -- =( pulumi gen-completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._pulumi"
zf_mv -f -- =( pulumi gen-completion zsh ) "$ZSH_CACHE_DIR/completions/_pulumi"
} &|
# Aliases
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_qodana"
zf_mv -f -- =( qodana completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._qodana"
zf_mv -f -- =( qodana completion zsh ) "$ZSH_CACHE_DIR/completions/_qodana"
} &|
+2 -2
View File
@@ -12,8 +12,8 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_rbw"
zf_mv -f -- =( rbw gen-completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._rbw"
zf_mv -f -- =( rbw gen-completions zsh ) "$ZSH_CACHE_DIR/completions/_rbw"
} &|
# rbwpw function copies the password of a service to the clipboard
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_rclone"
zf_mv -f -- =( rclone completion zsh - ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._rclone"
zf_mv -f -- =( rclone completion zsh - ) "$ZSH_CACHE_DIR/completions/_rclone"
} &|
+2 -2
View File
@@ -22,6 +22,6 @@ fi
# Overwrites the file each time as completions might change with ruff versions.
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_ruff"
zf_mv -f -- =( ruff generate-shell-completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._ruff"
zf_mv -f -- =( ruff generate-shell-completion zsh ) "$ZSH_CACHE_DIR/completions/_ruff"
} &|
+2 -2
View File
@@ -21,8 +21,8 @@ fi
# Generate completion files in the background
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_rustup"
zf_mv -f -- =( rustup completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._rustup"
zf_mv -f -- =( rustup completions zsh ) "$ZSH_CACHE_DIR/completions/_rustup"
} &|
cat >| "$ZSH_CACHE_DIR/completions/_cargo" <<'EOF'
#compdef cargo
+2 -2
View File
@@ -14,8 +14,8 @@ function install_autocompletion {
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_$1"
zf_mv -f -- =( $1 completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._$1"
zf_mv -f -- =( $1 completion zsh ) "$ZSH_CACHE_DIR/completions/_$1"
} "$1" &|
}
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_skaffold"
zf_mv -f -- =( skaffold completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._skaffold"
zf_mv -f -- =( skaffold completion zsh ) "$ZSH_CACHE_DIR/completions/_skaffold"
} &|
+3
View File
@@ -0,0 +1,3 @@
## Sops Plugin
This plugin sets up completion for [sops](https://getsops.io).
+18
View File
@@ -0,0 +1,18 @@
# COMPLETION FUNCTION
if (( ! $+commands[sops] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `sops`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_sops" ]]; then
typeset -g -A _comps
autoload -Uz _sops
_comps[sops]=_sops
fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._sops"
zf_mv -f -- =( sops completion zsh ) "$ZSH_CACHE_DIR/completions/_sops"
} &|
+2 -2
View File
@@ -12,6 +12,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_stripe"
zf_mv -f -- =( stripe completion --shell zsh --write-to-stdout ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._stripe"
zf_mv -f -- =( stripe completion --shell zsh --write-to-stdout ) "$ZSH_CACHE_DIR/completions/_stripe"
} &|
+2 -2
View File
@@ -24,6 +24,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_tailscale"
zf_mv -f -- =( tailscale completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._tailscale"
zf_mv -f -- =( tailscale completion zsh ) "$ZSH_CACHE_DIR/completions/_tailscale"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
# Generate and load task completion
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_task"
zf_mv -f -- =( task --completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._task"
zf_mv -f -- =( task --completion zsh ) "$ZSH_CACHE_DIR/completions/_task"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_timoni"
zf_mv -f -- =( timoni completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._timoni"
zf_mv -f -- =( timoni completion zsh ) "$ZSH_CACHE_DIR/completions/_timoni"
} &|
+1 -1
View File
@@ -52,7 +52,7 @@ The plugin will generate a default archive filename based on the input:
| Format | Description | Tool Used |
|:-----------------|:-------------------------------|:-----------------|
| `7z` | 7zip archive | `7z` |
| `7z` | 7zip archive | `7zz`,`7z`,`7za` |
| `bz2` | Bzip2-compressed file | `bzip2` |
| `gz` | Gzip-compressed file | `gzip` |
| `lzma` | LZMA-compressed file | `lzma` |
@@ -49,7 +49,17 @@ tlz (tar.lzma), txz (tar.xz), tZ (tar.Z), xz, Z, zip, and zst."
fi
case "$ext" in
7z) 7z u "${output}" "${@}" ;;
7z)
if (( $+commands[7zz] )); then
7zz u "${output}" "${@}"
elif (( $+commands[7z] )); then
7z u "${output}" "${@}"
elif (( $+commands[7za] )); then
7za u "${output}" "${@}"
else
echo "ua: cannot create 7z files: install 7zz, 7z or 7za" >&2
return 1
fi ;;
bz2) bzip2 -vcf "${@}" > "${output}" ;;
gz) gzip -vcf "${@}" > "${output}" ;;
lzma) lzma -vc -T0 "${@}" > "${output}" ;;
+4 -4
View File
@@ -45,10 +45,10 @@ fi
# Overwrites the file each time as completions might change with uv versions.
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_uv"
zf_mv -f -- =( uv generate-shell-completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._uv"
zf_mv -f -- =( uv generate-shell-completion zsh ) "$ZSH_CACHE_DIR/completions/_uv"
} &|
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_uvx"
zf_mv -f -- =( uvx --generate-shell-completion zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._uvx"
zf_mv -f -- =( uvx --generate-shell-completion zsh ) "$ZSH_CACHE_DIR/completions/_uvx"
} &|
+2 -2
View File
@@ -13,6 +13,6 @@ fi
zmodload -F zsh/files b:zf_mv
() {
local TMPPREFIX="$ZSH_CACHE_DIR/completions/_volta"
zf_mv -f -- =( volta completions zsh ) "$TMPPREFIX"
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._volta"
zf_mv -f -- =( volta completions zsh ) "$ZSH_CACHE_DIR/completions/_volta"
} &|