mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
This commit is contained in:
commit
10dc2fcaac
9 changed files with 42 additions and 3131 deletions
|
|
@ -121,8 +121,8 @@ fi
|
||||||
#
|
#
|
||||||
# As of May 2021 mlterm, PuTTY, rxvt, screen, termux & xterm simply ignore the unknown OSC.
|
# As of May 2021 mlterm, PuTTY, rxvt, screen, termux & xterm simply ignore the unknown OSC.
|
||||||
|
|
||||||
# Don't define the function if we're inside Emacs
|
# Don't define the function if we're inside Emacs or in an SSH session (#11696)
|
||||||
if [[ -n "$INSIDE_EMACS" ]]; then
|
if [[ -n "$INSIDE_EMACS" || -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -150,8 +150,11 @@ function omz_termsupport_cwd {
|
||||||
URL_HOST="$(omz_urlencode -P $HOST)" || return 1
|
URL_HOST="$(omz_urlencode -P $HOST)" || return 1
|
||||||
URL_PATH="$(omz_urlencode -P $PWD)" || return 1
|
URL_PATH="$(omz_urlencode -P $PWD)" || return 1
|
||||||
|
|
||||||
|
# Konsole errors if the HOST is provided
|
||||||
|
[[ -z "$KONSOLE_VERSION" ]] || URL_HOST=""
|
||||||
|
|
||||||
# common control sequence (OSC 7) to set current host and path
|
# common control sequence (OSC 7) to set current host and path
|
||||||
printf "\e]7;%s\a" "file://${URL_HOST}${URL_PATH}"
|
printf "\e]7;file://%s%s\e\\" "${URL_HOST}" "${URL_PATH}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ defined for convenience.
|
||||||
|
|
||||||
## Completion
|
## Completion
|
||||||
|
|
||||||
|
This plugin configures paths with Homebrew's completion functions automatically, so you don't need to do it manually. See: https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh.
|
||||||
|
|
||||||
With the release of Homebrew 1.0, they decided to bundle the zsh completion as part of the
|
With the release of Homebrew 1.0, they decided to bundle the zsh completion as part of the
|
||||||
brew installation, so we no longer ship it with the brew plugin; now it only has brew
|
brew installation, so we no longer ship it with the brew plugin; now it only has brew
|
||||||
aliases. If you find that brew completion no longer works, make sure you have your Homebrew
|
aliases. If you find that brew completion no longer works, make sure you have your Homebrew
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ if [[ -z "$HOMEBREW_PREFIX" ]]; then
|
||||||
export HOMEBREW_PREFIX="$(brew --prefix)"
|
export HOMEBREW_PREFIX="$(brew --prefix)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$HOMEBREW_PREFIX/share/zsh/site-functions" ]]; then
|
||||||
|
fpath+=("$HOMEBREW_PREFIX/share/zsh/site-functions")
|
||||||
|
fi
|
||||||
|
|
||||||
alias bcubc='brew upgrade --cask && brew cleanup'
|
alias bcubc='brew upgrade --cask && brew cleanup'
|
||||||
alias bcubo='brew update && brew outdated --cask'
|
alias bcubo='brew update && brew outdated --cask'
|
||||||
alias bcubc='brew upgrade --cask && brew cleanup'
|
alias bcubc='brew upgrade --cask && brew cleanup'
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -31,3 +31,22 @@ alias dvls='docker volume ls'
|
||||||
alias dvprune='docker volume prune'
|
alias dvprune='docker volume prune'
|
||||||
alias dxc='docker container exec'
|
alias dxc='docker container exec'
|
||||||
alias dxcit='docker container exec -it'
|
alias dxcit='docker container exec -it'
|
||||||
|
|
||||||
|
if (( ! $+commands[docker] )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
{
|
||||||
|
# `docker completion` is only available from 23.0.0 on
|
||||||
|
local _docker_version=$(docker version --format '{{.Client.Version}}' 2>/dev/null)
|
||||||
|
if is-at-least 23.0.0 $_docker_version; then
|
||||||
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `docker`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_docker" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _docker
|
||||||
|
_comps[docker]=_docker
|
||||||
|
fi
|
||||||
|
docker completion zsh >| "$ZSH_CACHE_DIR/completions/_docker"
|
||||||
|
fi
|
||||||
|
} &|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ These settings should go in your zshrc file, before Oh My Zsh is sourced:
|
||||||
#### Lazy startup
|
#### Lazy startup
|
||||||
|
|
||||||
This option will help you to defer nvm's load until you use it to speed-up your zsh startup. This will source
|
This option will help you to defer nvm's load until you use it to speed-up your zsh startup. This will source
|
||||||
nvm script only when using it, and will create a function for `node`, `npm`, `pnpm`, `yarn`, and the
|
nvm script only when using it, and will create a function for `node`, `npm`, `npx`, `pnpm`, `yarn`, and the
|
||||||
command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be loaded and run with
|
command(s) specified by `lazy-cmd` option, so when you call either of them, nvm will be loaded and run with
|
||||||
default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is sourced:
|
default version. To enable it, you can add this snippet to your zshrc, before Oh My Zsh is sourced:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ if zstyle -t ':omz:plugins:nvm' lazy; then
|
||||||
# Call nvm when first using nvm, node, npm, pnpm, yarn or other commands in lazy-cmd
|
# Call nvm when first using nvm, node, npm, pnpm, yarn or other commands in lazy-cmd
|
||||||
zstyle -a ':omz:plugins:nvm' lazy-cmd nvm_lazy_cmd
|
zstyle -a ':omz:plugins:nvm' lazy-cmd nvm_lazy_cmd
|
||||||
eval "
|
eval "
|
||||||
function nvm node npm pnpm yarn $nvm_lazy_cmd {
|
function nvm node npm npx pnpm yarn $nvm_lazy_cmd {
|
||||||
unfunction nvm node npm pnpm yarn $nvm_lazy_cmd
|
unfunction nvm node npm npx pnpm yarn $nvm_lazy_cmd
|
||||||
# Load nvm if it exists in \$NVM_DIR
|
# Load nvm if it exists in \$NVM_DIR
|
||||||
[[ -f \"\$NVM_DIR/nvm.sh\" ]] && source \"\$NVM_DIR/nvm.sh\"
|
[[ -f \"\$NVM_DIR/nvm.sh\" ]] && source \"\$NVM_DIR/nvm.sh\"
|
||||||
\"\$0\" \"\$@\"
|
\"\$0\" \"\$@\"
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,10 @@ plugins=(... rails)
|
||||||
| `rn` | `rails notes` | Search for notes (`FIXME`, `TODO`) in code comments |
|
| `rn` | `rails notes` | Search for notes (`FIXME`, `TODO`) in code comments |
|
||||||
| `rp` | `rails plugin` | Run a Rails plugin command |
|
| `rp` | `rails plugin` | Run a Rails plugin command |
|
||||||
| `rr` | `rails routes` | List all defined routes |
|
| `rr` | `rails routes` | List all defined routes |
|
||||||
| `rrg` | `rails routes \| grep` | List and filter the defined routes |
|
| `rrc` | `rails routes --controller` | List and filter routes mapped to specific controller |
|
||||||
|
| `rre` | `rails routes --expanded` | List all defined routes in expanded table mode |
|
||||||
|
| `rrg` | `rails routes --grep` | List and filter the defined routes |
|
||||||
|
| `rru` | `rails routes --unused` | List unused routes |
|
||||||
| `rs` | `rails server` | Launch a web server |
|
| `rs` | `rails server` | Launch a web server |
|
||||||
| `rsb` | `rails server --bind` | Launch a web server binding it to a specific IP |
|
| `rsb` | `rails server --bind` | Launch a web server binding it to a specific IP |
|
||||||
| `rsd` | `rails server --debugger` | Launch a web server with debugger |
|
| `rsd` | `rails server --debugger` | Launch a web server with debugger |
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,10 @@ alias rmd='rails middleware'
|
||||||
alias rn='rails notes'
|
alias rn='rails notes'
|
||||||
alias rp='rails plugin'
|
alias rp='rails plugin'
|
||||||
alias rr='rails routes'
|
alias rr='rails routes'
|
||||||
alias rrg='rails routes | grep'
|
alias rrc='rails routes --controller'
|
||||||
|
alias rre='rails routes --expanded'
|
||||||
|
alias rrg='rails routes --grep'
|
||||||
|
alias rru='rails routes --unused'
|
||||||
alias rs='rails server'
|
alias rs='rails server'
|
||||||
alias rsb='rails server --bind'
|
alias rsb='rails server --bind'
|
||||||
alias rsd='rails server --debugger'
|
alias rsd='rails server --debugger'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue