mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Merge branch 'ohmyzsh:master' into patch-1
This commit is contained in:
commit
a03d17319b
3 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ _togglePoetryShell() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory
|
# Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory
|
||||||
if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] || [[ "$PWD" != "$poetry_dir"* ]]; }; then
|
if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] && [[ "$PWD" != "$poetry_dir"* ]]; }; then
|
||||||
export poetry_active=0
|
export poetry_active=0
|
||||||
unset poetry_dir
|
unset poetry_dir
|
||||||
deactivate
|
deactivate
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ function _add_identities() {
|
||||||
# if id is an absolute path, make file equal to id
|
# if id is an absolute path, make file equal to id
|
||||||
[[ "$id" = /* ]] && file="$id" || file="$HOME/.ssh/$id"
|
[[ "$id" = /* ]] && file="$id" || file="$HOME/.ssh/$id"
|
||||||
# check for filename match, otherwise try for signature match
|
# check for filename match, otherwise try for signature match
|
||||||
if [[ ${loaded_ids[(I)$file]} -le 0 ]]; then
|
if [[ -f $file && ${loaded_ids[(I)$file]} -le 0 ]]; then
|
||||||
sig="$(ssh-keygen -lf "$file" | awk '{print $2}')"
|
sig="$(ssh-keygen -lf "$file" | awk '{print $2}')"
|
||||||
[[ ${loaded_sigs[(I)$sig]} -le 0 ]] && not_loaded+=("$file")
|
[[ ${loaded_sigs[(I)$sig]} -le 0 ]] && not_loaded+=("$file")
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ _fishy_collapsed_wd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
||||||
PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) '
|
local host_color='white'; [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && host_color='yellow'
|
||||||
|
PROMPT='%{$fg[$user_color]%}%n%{$reset_color%}@%{$fg[$host_color]%}%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) '
|
||||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
|
|
||||||
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
|
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue