Merge branch 'ohmyzsh:master' into master

This commit is contained in:
Eldar B 2025-07-22 23:29:04 +03:00 committed by GitHub
commit f3364b2b9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 36 additions and 13 deletions

View file

@ -40,7 +40,7 @@ fi
# disable named-directories autocompletion # disable named-directories autocompletion
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
# Use caching so that commands like apt and dpkg complete are useable # Use caching so that commands like apt and dpkg complete are usable
zstyle ':completion:*' use-cache yes zstyle ':completion:*' use-cache yes
zstyle ':completion:*' cache-path $ZSH_CACHE_DIR zstyle ':completion:*' cache-path $ZSH_CACHE_DIR

View file

@ -53,7 +53,7 @@ function omz_termsupport_precmd {
# Runs before executing the command # Runs before executing the command
function omz_termsupport_preexec { function omz_termsupport_preexec {
[[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return [[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return 0
emulate -L zsh emulate -L zsh
setopt extended_glob setopt extended_glob

View file

@ -11,6 +11,8 @@ plugins=(... alias-finder)
To enable it for every single command, set zstyle in your `~/.zshrc`. To enable it for every single command, set zstyle in your `~/.zshrc`.
If the user has installed `rg`([ripgrep](https://github.com/BurntSushi/ripgrep)), it will be used because it's faster. Otherwise, it will use the `grep` command.
```zsh ```zsh
# ~/.zshrc # ~/.zshrc

View file

@ -43,7 +43,11 @@ alias-finder() {
filter="^'?.{1,$((cmdLen - 1))}'?=" # some aliases is surrounded by single quotes filter="^'?.{1,$((cmdLen - 1))}'?=" # some aliases is surrounded by single quotes
fi fi
alias | grep -E "$filter" | grep -E "=$finder" if (( $+commands[rg] )); then
alias | rg "$filter" | rg "=$finder"
else
alias | grep -E "$filter" | grep -E "=$finder"
fi
if [[ $exact == true ]]; then if [[ $exact == true ]]; then
break # because exact case is only one break # because exact case is only one

View file

@ -272,7 +272,7 @@ _dnf5-repoquery() {
for v in enhance obsolete provide recommend require suggest supplement; do for v in enhance obsolete provide recommend require suggest supplement; do
opts+=( "--what${v}s=[limit to packages that $v specified capabilities]:list of capability: ") opts+=( "--what${v}s=[limit to packages that $v specified capabilities]:list of capability: ")
done done
# mutually exclusive formating options # mutually exclusive formatting options
opts+=( opts+=(
+ '(format)' + '(format)'
'--conflicts[display capabilities that the package conflicts with]' '--conflicts[display capabilities that the package conflicts with]'

View file

@ -10,7 +10,7 @@ _dotnet_completion() {
compdef _dotnet_completion dotnet compdef _dotnet_completion dotnet
# Aliases bellow are here for backwards compatibility # Aliases below are here for backwards compatibility
# added by Shaun Tabone (https://github.com/xontab) # added by Shaun Tabone (https://github.com/xontab)
alias dn='dotnet new' alias dn='dotnet new'

View file

@ -86,7 +86,7 @@ function work_in_progress() {
# Aliases # Aliases
# (sorted alphabetically by command) # (sorted alphabetically by command)
# (order should follow README) # (order should follow README)
# (in some cases force the alisas order to match README, like for example gke and gk) # (in some cases force the alias order to match README, like for example gke and gk)
# #
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'

View file

@ -19,8 +19,15 @@ function {
# load additional options # load additional options
zstyle -a :omz:plugins:keychain options options zstyle -a :omz:plugins:keychain options options
# start keychain... # Check keychain version to decide whether to use --agents
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST local version_string=$(keychain --version 2>&1 | head -n 2 | tail -n 1 | cut -d ' ' -f 4)
# start keychain, only use --agents for versions below 2.9.0
autoload -Uz is-at-least
if is-at-least 2.9 "$version_string"; then
keychain ${^options:-} ${^identities} --host $SHORT_HOST
else
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
fi
# Get the filenames to store/lookup the environment from # Get the filenames to store/lookup the environment from
_keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh" _keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh"

View file

@ -49,4 +49,4 @@ plugins=(... systemadmin)
| geteip | Gather information regarding an external IP address using [icanhazip.com](https://icanhazip.com) | | geteip | Gather information regarding an external IP address using [icanhazip.com](https://icanhazip.com) |
| getip | Determine the local IP Address with `ip addr` or `ifconfig` | | getip | Determine the local IP Address with `ip addr` or `ifconfig` |
| clrz | Clear zombie processes | | clrz | Clear zombie processes |
| conssec | Show number of concurrent connections per second based on ngnix/access.log file or another log file if specified | | conssec | Show number of concurrent connections per second based on nginx/access.log file or another log file if specified |

View file

@ -188,7 +188,7 @@ function _tmux_directory_session() {
alias tds=_tmux_directory_session alias tds=_tmux_directory_session
# Autostart if not already in tmux and enabled. # Autostart if not already in tmux and enabled.
if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" ]]; then if [[ -z "$TMUX" && "$ZSH_TMUX_AUTOSTART" == "true" && -z "$INSIDE_EMACS" && -z "$EMACS" && -z "$VIM" && -z "$INTELLIJ_ENVIRONMENT_READER" && -z "$ZED_TERM" ]]; then
# Actually don't autostart if we already did and multiple autostarts are disabled. # Actually don't autostart if we already did and multiple autostarts are disabled.
if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then if [[ "$ZSH_TMUX_AUTOSTART_ONCE" == "false" || "$ZSH_TMUX_AUTOSTARTED" != "true" ]]; then
export ZSH_TMUX_AUTOSTARTED=true export ZSH_TMUX_AUTOSTARTED=true

View file

@ -47,10 +47,13 @@ Available search contexts are:
| `youtube` | `https://www.youtube.com/results?search_query=` | | `youtube` | `https://www.youtube.com/results?search_query=` |
| `deepl` | `https://www.deepl.com/translator#auto/auto/` | | `deepl` | `https://www.deepl.com/translator#auto/auto/` |
| `dockerhub` | `https://hub.docker.com/search?q=` | | `dockerhub` | `https://hub.docker.com/search?q=` |
| `gems` | `https://rubygems.org/search?query=` |
| `npmpkg` | `https://www.npmjs.com/search?q=` | | `npmpkg` | `https://www.npmjs.com/search?q=` |
| `packagist` | `https://packagist.org/?query=` | | `packagist` | `https://packagist.org/?query=` |
| `gopkg` | `https://pkg.go.dev/search?m=package&q=` | | `gopkg` | `https://pkg.go.dev/search?m=package&q=` |
| `chatgpt` | `https://chatgpt.com/?q=` | | `chatgpt` | `https://chatgpt.com/?q=` |
| `claude` | `https://claude.ai/new?q=` |
| `grok` | `https://grok.com/?q=` |
| `reddit` | `https://www.reddit.com/search/?q=` | | `reddit` | `https://www.reddit.com/search/?q=` |
| `ppai` | `https://www.perplexity.ai/search/new?q=` | | `ppai` | `https://www.perplexity.ai/search/new?q=` |

View file

@ -28,10 +28,13 @@ function web_search() {
youtube "https://www.youtube.com/results?search_query=" youtube "https://www.youtube.com/results?search_query="
deepl "https://www.deepl.com/translator#auto/auto/" deepl "https://www.deepl.com/translator#auto/auto/"
dockerhub "https://hub.docker.com/search?q=" dockerhub "https://hub.docker.com/search?q="
gems "https://rubygems.org/search?query="
npmpkg "https://www.npmjs.com/search?q=" npmpkg "https://www.npmjs.com/search?q="
packagist "https://packagist.org/?query=" packagist "https://packagist.org/?query="
gopkg "https://pkg.go.dev/search?m=package&q=" gopkg "https://pkg.go.dev/search?m=package&q="
chatgpt "https://chatgpt.com/?q=" chatgpt "https://chatgpt.com/?q="
grok "https://grok.com/?q="
claude "https://claude.ai/new?q="
reddit "https://www.reddit.com/search/?q=" reddit "https://www.reddit.com/search/?q="
ppai "https://www.perplexity.ai/search/new?q=" ppai "https://www.perplexity.ai/search/new?q="
) )
@ -83,10 +86,13 @@ alias ask='web_search ask'
alias youtube='web_search youtube' alias youtube='web_search youtube'
alias deepl='web_search deepl' alias deepl='web_search deepl'
alias dockerhub='web_search dockerhub' alias dockerhub='web_search dockerhub'
alias gems='web_search gems'
alias npmpkg='web_search npmpkg' alias npmpkg='web_search npmpkg'
alias packagist='web_search packagist' alias packagist='web_search packagist'
alias gopkg='web_search gopkg' alias gopkg='web_search gopkg'
alias chatgpt='web_search chatgpt' alias chatgpt='web_search chatgpt'
alias grok='web_search grok'
alias claude='web_search claude'
alias reddit='web_search reddit' alias reddit='web_search reddit'
alias ppai='web_search ppai' alias ppai='web_search ppai'
@ -106,3 +112,4 @@ if [[ ${#ZSH_WEB_SEARCH_ENGINES} -gt 0 ]]; then
done done
unset engines key unset engines key
fi fi