z4h and p10k

main
Alpha Chen 10 months ago
parent 0536ef633c
commit db73778d8e
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -939,7 +939,8 @@
# Context format when in SSH without privileges: user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
# Default context format (no privileges, no SSH): user@hostname.
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
# typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE=%n@${${${Z4H_SSH##*:}//\%/%%}:-%m}
# Don't show context unless running with privileges or in SSH.
# Tip: Remove the next line to always show context.

@ -29,7 +29,7 @@ zstyle ':z4h:autosuggestions' forward-char 'accept'
# Recursively traverse directories when TAB-completing files.
zstyle ':z4h:fzf-complete' recurse-dirs 'yes'
# zstyle ':z4h:fzf-complete' fzf-bindings tab:repeat
zstyle ':z4h:fzf-complete' fzf-bindings tab:repeat
# Enable direnv to automatically source .envrc files.
zstyle ':z4h:direnv' enable 'yes'
@ -38,11 +38,18 @@ zstyle ':z4h:direnv:success' notify 'yes'
# Enable ('yes') or disable ('no') automatic teleportation of z4h over
# SSH when connecting to these hosts.
zstyle ':z4h:ssh:example-hostname1' enable 'yes'
zstyle ':z4h:ssh:*.example-hostname2' enable 'no'
# zstyle ':z4h:ssh:example-hostname1' enable 'yes'
# zstyle ':z4h:ssh:*.example-hostname2' enable 'no'
# The default value if none of the overrides above match the hostname.
zstyle ':z4h:ssh:*' enable 'no'
zstyle ':completion:*:ssh:argument-1:' tag-order hosts users
zstyle ':completion:*:scp:argument-rest:' tag-order hosts files users
zstyle ':completion:*:(ssh|scp|rdp):*:hosts' hosts
zstyle ':z4h:term-title:ssh' preexec '%n@'${${${Z4H_SSH##*:}//\%/%%}:-%m}': ${1//\%/%%}'
zstyle ':z4h:term-title:ssh' precmd '%n@'${${${Z4H_SSH##*:}//\%/%%}:-%m}': %~'
# Send these files over to the remote host when connecting over SSH to the
# enabled hosts.
# zstyle ':z4h:ssh:*' send-extra-files '~/.nanorc' '~/.env.zsh'
@ -67,7 +74,7 @@ path=(~/bin $path)
export GPG_TTY=$TTY
# Source additional local files if they exist.
z4h source ~/.env.zsh
z4h source ~/.local.zsh
# Use additional Git repositories pulled in with `z4h install`.
#
@ -116,8 +123,7 @@ alias tat='tmux new-session -As `basename $PWD | ruby -e "puts ARGF.read.strip.d
alias tree='tree -a -I .git'
# Add flags to existing aliases.
# alias ls="${aliases[ls]:-ls} -A"
# alias ls="${aliases[ls]:-eza} -A"
alias ls="${aliases[ls]:-ls} -A"
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html.
setopt glob_dots # no special treatment for file names with a leading dot

Loading…
Cancel
Save