mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge branch 'ohmyzsh:master' into master
This commit is contained in:
commit
424286cab1
19 changed files with 114 additions and 77 deletions
13
.github/workflows/dependencies.yml
vendored
13
.github/workflows/dependencies.yml
vendored
|
|
@ -4,6 +4,9 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 0"
|
- cron: "0 6 * * 0"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check for updates
|
name: Check for updates
|
||||||
|
|
@ -15,11 +18,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
id: generate_token
|
id: generate-token
|
||||||
uses: ohmyzsh/github-app-token@v2
|
uses: actions/create-github-app-token@v2
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.OHMYZSH_APP_ID }}
|
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
||||||
private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
|
|
@ -27,7 +30,7 @@ jobs:
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
- name: Process dependencies
|
- name: Process dependencies
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
GIT_APP_NAME: ohmyzsh[bot]
|
GIT_APP_NAME: ohmyzsh[bot]
|
||||||
GIT_APP_EMAIL: 54982679+ohmyzsh[bot]@users.noreply.github.com
|
GIT_APP_EMAIL: 54982679+ohmyzsh[bot]@users.noreply.github.com
|
||||||
TMP_DIR: ${{ runner.temp }}
|
TMP_DIR: ${{ runner.temp }}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
certifi==2025.4.26
|
certifi==2025.7.14
|
||||||
charset-normalizer==3.4.2
|
charset-normalizer==3.4.2
|
||||||
idna==3.10
|
idna==3.10
|
||||||
PyYAML==6.0.2
|
PyYAML==6.0.2
|
||||||
|
|
|
||||||
10
.github/workflows/project.yml
vendored
10
.github/workflows/project.yml
vendored
|
|
@ -17,13 +17,13 @@ jobs:
|
||||||
if: github.repository == 'ohmyzsh/ohmyzsh'
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
||||||
steps:
|
steps:
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
id: generate_token
|
id: generate-token
|
||||||
uses: ohmyzsh/github-app-token@v2
|
uses: actions/create-github-app-token@v2
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.OHMYZSH_APP_ID }}
|
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
||||||
private_key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
- name: Store app token
|
- name: Store app token
|
||||||
run: echo "GH_TOKEN=${{ steps.generate_token.outputs.token }}" >> "$GITHUB_ENV"
|
run: echo "GH_TOKEN=${{ steps.generate-token.outputs.token }}" >> "$GITHUB_ENV"
|
||||||
- name: Read project data
|
- name: Read project data
|
||||||
env:
|
env:
|
||||||
ORGANIZATION: ohmyzsh
|
ORGANIZATION: ohmyzsh
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -28,7 +30,7 @@ When you execute a command alias finder will look at your defined aliases and su
|
||||||
|
|
||||||
Running the un-aliased `git status` command:
|
Running the un-aliased `git status` command:
|
||||||
```sh
|
```sh
|
||||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||||
╰─$ git status
|
╰─$ git status
|
||||||
|
|
||||||
gst='git status' # <=== shorter suggestion from alias-finder
|
gst='git status' # <=== shorter suggestion from alias-finder
|
||||||
|
|
@ -40,7 +42,7 @@ nothing to commit, working tree clean
|
||||||
|
|
||||||
Running a shorter `git st` alias from `.gitconfig` that it suggested :
|
Running a shorter `git st` alias from `.gitconfig` that it suggested :
|
||||||
```sh
|
```sh
|
||||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||||
╰─$ git st
|
╰─$ git st
|
||||||
gs='git st' # <=== shorter suggestion from alias-finder
|
gs='git st' # <=== shorter suggestion from alias-finder
|
||||||
## main...origin/main
|
## main...origin/main
|
||||||
|
|
@ -48,7 +50,7 @@ gs='git st' # <=== shorter suggestion from alias-finder
|
||||||
|
|
||||||
Running the shortest `gs` shell alias that it found:
|
Running the shortest `gs` shell alias that it found:
|
||||||
```sh
|
```sh
|
||||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||||
╰─$ gs
|
╰─$ gs
|
||||||
# <=== no suggestions alias-finder because this is the shortest
|
# <=== no suggestions alias-finder because this is the shortest
|
||||||
## main...origin/main
|
## main...origin/main
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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]'
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
|
||||||
|
|
@ -14,53 +14,56 @@ plugins=(... extract)
|
||||||
|
|
||||||
## Supported file extensions
|
## Supported file extensions
|
||||||
|
|
||||||
| Extension | Description |
|
| Extension | Description |
|
||||||
| :---------------- | :----------------------------------- |
|
| :---------------- | :-------------------------------------- |
|
||||||
| `7z` | 7zip file |
|
| `7z` | 7zip file |
|
||||||
| `Z` | Z archive (LZW) |
|
| `apk` | Android app file |
|
||||||
| `apk` | Android app file |
|
| `aar` | Android library file |
|
||||||
| `aar` | Android library file |
|
| `bz2` | Bzip2 file |
|
||||||
| `bz2` | Bzip2 file |
|
| `cab` | Microsoft cabinet archive |
|
||||||
| `cab` | Microsoft cabinet archive |
|
| `cpio` | Cpio archive |
|
||||||
| `cpio` | Cpio archive |
|
| `deb` | Debian package |
|
||||||
| `deb` | Debian package |
|
| `ear` | Enterprise Application aRchive |
|
||||||
| `ear` | Enterprise Application aRchive |
|
| `exe` | Windows executable file |
|
||||||
| `exe` | Windows executable file |
|
| `gz` | Gzip file |
|
||||||
| `gz` | Gzip file |
|
| `ipa` | iOS app package |
|
||||||
| `ipa` | iOS app package |
|
| `ipsw` | iOS firmware file |
|
||||||
| `ipsw` | iOS firmware file |
|
| `jar` | Java Archive |
|
||||||
| `jar` | Java Archive |
|
| `lrz` | LRZ archive |
|
||||||
| `lrz` | LRZ archive |
|
| `lz4` | LZ4 archive |
|
||||||
| `lz4` | LZ4 archive |
|
| `lzma` | LZMA archive |
|
||||||
| `lzma` | LZMA archive |
|
| `obscpio` | cpio archive used on OBS |
|
||||||
| `obscpio` | cpio archive used on OBS |
|
| `pk3` | Renamed Zip archive used by Quake games |
|
||||||
| `rar` | WinRAR archive |
|
| `pk4` | Renamed Zip archive used by Quake games |
|
||||||
| `rpm` | RPM package |
|
| `pk7` | Renamed 7zip file used by Quake games |
|
||||||
| `sublime-package` | Sublime Text package |
|
| `rar` | WinRAR archive |
|
||||||
| `tar` | Tarball |
|
| `rpm` | RPM package |
|
||||||
| `tar.bz2` | Tarball with bzip2 compression |
|
| `sublime-package` | Sublime Text package |
|
||||||
| `tar.gz` | Tarball with gzip compression |
|
| `tar` | Tarball |
|
||||||
| `tar.lrz` | Tarball with lrzip compression |
|
| `tar.bz2` | Tarball with bzip2 compression |
|
||||||
| `tar.lz` | Tarball with lzip compression |
|
| `tar.gz` | Tarball with gzip compression |
|
||||||
| `tar.lz4` | Tarball with lz4 compression |
|
| `tar.lrz` | Tarball with lrzip compression |
|
||||||
| `tar.xz` | Tarball with lzma2 compression |
|
| `tar.lz` | Tarball with lzip compression |
|
||||||
| `tar.zma` | Tarball with lzma compression |
|
| `tar.lz4` | Tarball with lz4 compression |
|
||||||
| `tar.zst` | Tarball with zstd compression |
|
| `tar.xz` | Tarball with lzma2 compression |
|
||||||
| `tbz` | Tarball with bzip compression |
|
| `tar.zma` | Tarball with lzma compression |
|
||||||
| `tbz2` | Tarball with bzip2 compression |
|
| `tar.zst` | Tarball with zstd compression |
|
||||||
| `tgz` | Tarball with gzip compression |
|
| `tbz` | Tarball with bzip compression |
|
||||||
| `tlz` | Tarball with lzma compression |
|
| `tbz2` | Tarball with bzip2 compression |
|
||||||
| `txz` | Tarball with lzma2 compression |
|
| `tgz` | Tarball with gzip compression |
|
||||||
| `tzst` | Tarball with zstd compression |
|
| `tlz` | Tarball with lzma compression |
|
||||||
| `vsix` | VS Code extension zip file |
|
| `txz` | Tarball with lzma2 compression |
|
||||||
| `war` | Web Application archive (Java-based) |
|
| `tzst` | Tarball with zstd compression |
|
||||||
| `whl` | Python wheel file |
|
| `vsix` | VS Code extension zip file |
|
||||||
| `xpi` | Mozilla XPI module file |
|
| `war` | Web Application archive (Java-based) |
|
||||||
| `xz` | LZMA2 archive |
|
| `whl` | Python wheel file |
|
||||||
| `zip` | Zip archive |
|
| `xpi` | Mozilla XPI module file |
|
||||||
| `zlib` | zlib archive |
|
| `xz` | LZMA2 archive |
|
||||||
| `zst` | Zstandard file (zstd) |
|
| `Z` | Z archive (LZW) |
|
||||||
| `zpaq` | Zpaq file |
|
| `zip` | Zip archive |
|
||||||
|
| `zlib` | zlib archive |
|
||||||
|
| `zst` | Zstandard file (zstd) |
|
||||||
|
| `zpaq` | Zpaq file |
|
||||||
|
|
||||||
See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for more information
|
See [list of archive formats](https://en.wikipedia.org/wiki/List_of_archive_formats) for more information
|
||||||
regarding archive formats.
|
regarding archive formats.
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ local -a exts=(
|
||||||
lz4
|
lz4
|
||||||
lzma
|
lzma
|
||||||
obscpio
|
obscpio
|
||||||
|
pk3
|
||||||
|
pk4
|
||||||
|
pk7
|
||||||
rar
|
rar
|
||||||
rpm
|
rpm
|
||||||
sublime-package
|
sublime-package
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,11 @@ EOF
|
||||||
(*.lz4) lz4 -d "$full_path" ;;
|
(*.lz4) lz4 -d "$full_path" ;;
|
||||||
(*.lzma) unlzma "$full_path" ;;
|
(*.lzma) unlzma "$full_path" ;;
|
||||||
(*.z) uncompress "$full_path" ;;
|
(*.z) uncompress "$full_path" ;;
|
||||||
(*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx) unzip "$full_path" ;;
|
(*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx|*.pk3|*.pk4) unzip "$full_path" ;;
|
||||||
(*.rar) unrar x -ad "$full_path" ;;
|
(*.rar) unrar x -ad "$full_path" ;;
|
||||||
(*.rpm)
|
(*.rpm)
|
||||||
rpm2cpio "$full_path" | cpio --quiet -id ;;
|
rpm2cpio "$full_path" | cpio --quiet -id ;;
|
||||||
(*.7z | *.7z.[0-9]*) 7za x "$full_path" ;;
|
(*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;;
|
||||||
(*.deb)
|
(*.deb)
|
||||||
command mkdir -p "control" "data"
|
command mkdir -p "control" "data"
|
||||||
ar vx "$full_path" > /dev/null
|
ar vx "$full_path" > /dev/null
|
||||||
|
|
|
||||||
|
|
@ -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 .)"'
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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=` |
|
||||||
|
| `claudeai` | `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=` |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,17 @@ 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="
|
||||||
|
claudeai "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="
|
||||||
|
rscrate "https://crates.io/search?q="
|
||||||
|
rsdoc "https://docs.rs/releases/search?query="
|
||||||
)
|
)
|
||||||
|
|
||||||
# check whether the search engine is supported
|
# check whether the search engine is supported
|
||||||
|
|
@ -83,12 +88,17 @@ 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 claudeai='web_search claudeai'
|
||||||
alias reddit='web_search reddit'
|
alias reddit='web_search reddit'
|
||||||
alias ppai='web_search ppai'
|
alias ppai='web_search ppai'
|
||||||
|
alias rscrate='web_search rscrate'
|
||||||
|
alias rsdoc='web_search rsdoc'
|
||||||
|
|
||||||
#add your own !bang searches here
|
#add your own !bang searches here
|
||||||
alias wiki='web_search duckduckgo \!w'
|
alias wiki='web_search duckduckgo \!w'
|
||||||
|
|
@ -106,3 +116,4 @@ if [[ ${#ZSH_WEB_SEARCH_ENGINES} -gt 0 ]]; then
|
||||||
done
|
done
|
||||||
unset engines key
|
unset engines key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,15 @@ function theme_precmd {
|
||||||
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
|
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
|
||||||
local pwdsize=${#${(%):-%~}}
|
local pwdsize=${#${(%):-%~}}
|
||||||
local venvpromptsize=$((${#$(virtualenv_prompt_info)}))
|
local venvpromptsize=$((${#$(virtualenv_prompt_info)}))
|
||||||
|
local condapromptsize=$((${#$(conda_prompt_info)}))
|
||||||
|
|
||||||
# Truncate the path if it's too long.
|
# Truncate the path if it's too long.
|
||||||
if (( promptsize + rubypromptsize + pwdsize + venvpromptsize > TERMWIDTH )); then
|
if (( promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize > TERMWIDTH )); then
|
||||||
(( PR_PWDLEN = TERMWIDTH - promptsize ))
|
(( PR_PWDLEN = TERMWIDTH - promptsize ))
|
||||||
elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
|
elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
|
||||||
PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${PR_HBAR}:)}"
|
PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${PR_HBAR}:)}"
|
||||||
else
|
else
|
||||||
PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
|
PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +105,7 @@ fi
|
||||||
PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
|
PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
|
||||||
${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
|
${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
|
||||||
${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
|
${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
|
||||||
${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
|
${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
|
||||||
${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
|
${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
|
||||||
${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\
|
${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue