mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge branch 'ohmyzsh:master' into master
This commit is contained in:
commit
45df83c706
8 changed files with 38 additions and 29 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
|
@ -1,6 +1,5 @@
|
||||||
# Plugin owners
|
# Plugin owners
|
||||||
plugins/archlinux/ @ratijas
|
plugins/archlinux/ @ratijas
|
||||||
plugins/aws/ @maksyms
|
|
||||||
plugins/genpass/ @atoponce
|
plugins/genpass/ @atoponce
|
||||||
plugins/git-lfs/ @hellovietduc
|
plugins/git-lfs/ @hellovietduc
|
||||||
plugins/gitfast/ @felipec
|
plugins/gitfast/ @felipec
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
declare -a autojump_paths
|
declare -a autojump_paths
|
||||||
autojump_paths=(
|
autojump_paths=(
|
||||||
$HOME/.autojump/etc/profile.d/autojump.zsh # manual installation
|
$HOME/.autojump/etc/profile.d/autojump.zsh # manual installation
|
||||||
$HOME/.autojump/share/autojump/autojump.zsh # manual installation
|
$HOME/.autojump/share/autojump/autojump.zsh # manual installation
|
||||||
$HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation
|
$HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation
|
||||||
/run/current-system/sw/share/autojump/autojump.zsh # NixOS installation
|
/run/current-system/sw/share/autojump/autojump.zsh # NixOS installation
|
||||||
/usr/share/autojump/autojump.zsh # Debian and Ubuntu package
|
/usr/share/autojump/autojump.zsh # Debian and Ubuntu package
|
||||||
/etc/profile.d/autojump.zsh # manual installation
|
/etc/profile.d/autojump.zsh # manual installation
|
||||||
/etc/profile.d/autojump.sh # Gentoo installation
|
/etc/profile.d/autojump.sh # Gentoo installation
|
||||||
/usr/local/share/autojump/autojump.zsh # FreeBSD installation
|
/usr/local/share/autojump/autojump.zsh # FreeBSD installation
|
||||||
/usr/pkg/share/autojump/autojump.zsh # NetBSD installation
|
/usr/pkg/share/autojump/autojump.zsh # NetBSD installation
|
||||||
/opt/local/etc/profile.d/autojump.sh # macOS with MacPorts
|
/opt/local/etc/profile.d/autojump.sh # macOS with MacPorts
|
||||||
/usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default)
|
/usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default)
|
||||||
/opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs)
|
/opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs)
|
||||||
/etc/profiles/per-user/$USER/bin/autojump # macOS Nix, Home Manager and flakes
|
/etc/profiles/per-user/$USER/etc/profile.d/autojump.sh # macOS Nix, Home Manager and flakes
|
||||||
)
|
)
|
||||||
|
|
||||||
for file in $autojump_paths; do
|
for file in $autojump_paths; do
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ __gitex_remote_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a remote_names
|
declare -a remote_names
|
||||||
remote_names=(${(f)"$(_call_program remotes git remote 2>/dev/null)"})
|
remote_names=(${(f)"$(_call_program remotes git remote 2>/dev/null)"})
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted remote-names expl remote-name compadd $* - $remote_names
|
_wanted remote-names expl remote-name compadd $* - $remote_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ __gitex_tag_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a tag_names
|
declare -a tag_names
|
||||||
tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
|
tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted tag-names expl tag-name compadd $* - $tag_names
|
_wanted tag-names expl tag-name compadd $* - $tag_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ __gitex_branch_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a branch_names
|
declare -a branch_names
|
||||||
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
|
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted branch-names expl branch-name compadd $* - $branch_names
|
_wanted branch-names expl branch-name compadd $* - $branch_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ __gitex_specific_branch_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a branch_names
|
declare -a branch_names
|
||||||
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/})
|
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/})
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted branch-names expl branch-name compadd - $branch_names
|
_wanted branch-names expl branch-name compadd - $branch_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@ __gitex_submodule_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a submodule_names
|
declare -a submodule_names
|
||||||
submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # '
|
submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # '
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted submodule-names expl submodule-name compadd $* - $submodule_names
|
_wanted submodule-names expl submodule-name compadd $* - $submodule_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ __gitex_author_names() {
|
||||||
local expl
|
local expl
|
||||||
declare -a author_names
|
declare -a author_names
|
||||||
author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"})
|
author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"})
|
||||||
__git_command_successful || return
|
__gitex_command_successful || return
|
||||||
_wanted author-names expl author-name compadd $* - $author_names
|
_wanted author-names expl author-name compadd $* - $author_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ function work_in_progress() {
|
||||||
function git_main_branch() {
|
function git_main_branch() {
|
||||||
command git rev-parse --git-dir &>/dev/null || return
|
command git rev-parse --git-dir &>/dev/null || return
|
||||||
local ref
|
local ref
|
||||||
for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk}; do
|
for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do
|
||||||
if command git show-ref -q --verify $ref; then
|
if command git show-ref -q --verify $ref; then
|
||||||
echo ${ref:t}
|
echo ${ref:t}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ function listMavenCompletions {
|
||||||
# spring-boot
|
# spring-boot
|
||||||
spring-boot:run spring-boot:repackage
|
spring-boot:run spring-boot:repackage
|
||||||
# quarkus
|
# quarkus
|
||||||
quarkus:dev quarkus:list-extensions quarkus:add-extension quarkus:add-extensions quarkus:generate-config quarkus:help
|
quarkus:dev quarkus:list-extensions quarkus:add-extension quarkus:add-extensions quarkus:remove-extension quarkus:remove-extensions quarkus:generate-config quarkus:help
|
||||||
# exec
|
# exec
|
||||||
exec:exec exec:java
|
exec:exec exec:java
|
||||||
# versions
|
# versions
|
||||||
|
|
@ -287,7 +287,7 @@ function listMavenCompletions {
|
||||||
vaadin:prepare-frontend vaadin:build-frontend vaadin:clean-frontend vaadin:dance
|
vaadin:prepare-frontend vaadin:build-frontend vaadin:clean-frontend vaadin:dance
|
||||||
|
|
||||||
# options
|
# options
|
||||||
"-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile="
|
"-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile=" "-Dextensions="
|
||||||
|
|
||||||
# arguments
|
# arguments
|
||||||
-am --also-make
|
-am --also-make
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
# Pipenv completion
|
if (( ! $+commands[pipenv] )); then
|
||||||
_pipenv() {
|
return
|
||||||
eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv)
|
fi
|
||||||
}
|
|
||||||
compdef _pipenv pipenv
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `pipenv`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pipenv" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _pipenv
|
||||||
|
_comps[pipenv]=_pipenv
|
||||||
|
fi
|
||||||
|
|
||||||
|
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||||
|
|
||||||
# Automatic pipenv shell activation/deactivation
|
# Automatic pipenv shell activation/deactivation
|
||||||
_togglePipenvShell() {
|
_togglePipenvShell() {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ function systemd_prompt_info {
|
||||||
|
|
||||||
if systemctl is-active "$unit" &>/dev/null; then
|
if systemctl is-active "$unit" &>/dev/null; then
|
||||||
echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE"
|
echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE"
|
||||||
|
elif systemctl --user is-active "$unit" &>/dev/null; then
|
||||||
|
echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE"
|
||||||
else
|
else
|
||||||
echo -n "$ZSH_THEME_SYSTEMD_PROMPT_NOTACTIVE"
|
echo -n "$ZSH_THEME_SYSTEMD_PROMPT_NOTACTIVE"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ zstyle -s ':omz:update' mode update_mode || {
|
||||||
# - git is unavailable on the system.
|
# - git is unavailable on the system.
|
||||||
if [[ "$update_mode" = disabled ]] \
|
if [[ "$update_mode" = disabled ]] \
|
||||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||||
|| ! command -v git &>/dev/null; then
|
|| ! command git --version 2>&1 >/dev/null; then
|
||||||
unset update_mode
|
unset update_mode
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue