1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-26 01:57:26 +08:00

Compare commits

..

No commits in common. "48a3c2f32d1a4643db367eed4d6c53768c3847b1" and "12669f29f0843b8b980dd137f150a74511f88842" have entirely different histories.

3 changed files with 5 additions and 19 deletions

View File

@ -7,7 +7,6 @@ function setup_using_base_dir() {
fzfdirs=( fzfdirs=(
"${HOME}/.fzf" "${HOME}/.fzf"
"${HOME}/.nix-profile/share/fzf" "${HOME}/.nix-profile/share/fzf"
"${XDG_DATA_HOME:-$HOME/.local/share}/fzf"
"/usr/local/opt/fzf" "/usr/local/opt/fzf"
"/usr/share/fzf" "/usr/share/fzf"
"/usr/local/share/examples/fzf" "/usr/local/share/examples/fzf"

View File

@ -131,8 +131,7 @@ d0() {
# gather external ip address # gather external ip address
geteip() { geteip() {
curl -s -S -4 https://icanhazip.com curl -s -S https://icanhazip.com
curl -s -S -6 https://icanhazip.com
} }
# determine local IP address(es) # determine local IP address(es)

View File

@ -26,26 +26,15 @@ ys_hg_prompt_info() {
if [ -d '.hg' ]; then if [ -d '.hg' ]; then
echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}" echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"
echo -n $(hg branch 2>/dev/null) echo -n $(hg branch 2>/dev/null)
if [[ "$(hg config oh-my-zsh.hide-dirty 2>/dev/null)" != "1" ]]; then
if [ -n "$(hg status 2>/dev/null)" ]; then if [ -n "$(hg status 2>/dev/null)" ]; then
echo -n "$YS_VCS_PROMPT_DIRTY" echo -n "$YS_VCS_PROMPT_DIRTY"
else else
echo -n "$YS_VCS_PROMPT_CLEAN" echo -n "$YS_VCS_PROMPT_CLEAN"
fi fi
fi
echo -n "$YS_VCS_PROMPT_SUFFIX" echo -n "$YS_VCS_PROMPT_SUFFIX"
fi fi
} }
# Virtualenv
local venv_info='$(virtenv_prompt)'
YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}"
YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%"
virtenv_prompt() {
[[ -n ${VIRTUAL_ENV} ]] || return
echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}"
}
local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})" local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})"
# Prompt format: # Prompt format:
@ -66,7 +55,6 @@ PROMPT="
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\ %{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${hg_info}\ ${hg_info}\
${git_info}\ ${git_info}\
${venv_info}\
\ \
%{$fg[white]%}[%*] $exit_code %{$fg[white]%}[%*] $exit_code
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"