mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-18 21:27:42 +00:00
Format zsh files
This commit is contained in:
parent
12e3660fc6
commit
47b871b76b
@ -39,10 +39,10 @@ export FZF_COMPLETION_TRIGGER='**'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
|
||||
_fzf_compgen_dir() {
|
||||
fd -Ht d
|
||||
fd -Ht d
|
||||
}
|
||||
_fzf_compgen_path() {
|
||||
fd -Ht f
|
||||
fd -Ht f
|
||||
}
|
||||
|
||||
# dotfile repository location
|
||||
@ -61,9 +61,9 @@ export GPG_TTY="$(tty)"
|
||||
|
||||
# set SSH_AUTH_SOCK if not logging in over SSH
|
||||
if [ "$SSH_CONNECTION" = "" ]; then
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
#gpgconf --launch gpg-agent
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
#gpgconf --launch gpg-agent
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
fi
|
||||
|
||||
# Enable grc colorization of supported commands
|
||||
|
@ -1,7 +1,7 @@
|
||||
# install zinit if it's not already installed
|
||||
if [ ! -f ~/.zinit/bin/zinit.zsh ]; then
|
||||
mkdir ~/.zinit
|
||||
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
|
||||
mkdir ~/.zinit
|
||||
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
|
||||
fi
|
||||
|
||||
source ~/.zinit/bin/zinit.zsh
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Launch tmux if logging in over ssh
|
||||
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
||||
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
|
||||
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
|
||||
fi
|
||||
|
||||
# share history between running zsh instances
|
||||
|
@ -5,13 +5,13 @@ zshcache_time="$(date +%s%N)"
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
rehash_precmd() {
|
||||
if [[ -a /var/cache/zsh/pacman ]]; then
|
||||
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
||||
if (( zshcache_time < paccache_time )); then
|
||||
rehash
|
||||
zshcache_time="$paccache_time"
|
||||
if [[ -e /var/cache/zsh/pacman ]]; then
|
||||
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
||||
if ((zshcache_time < paccache_time)); then
|
||||
rehash
|
||||
zshcache_time="$paccache_time"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add-zsh-hook -Uz precmd rehash_precmd
|
||||
|
Loading…
Reference in New Issue
Block a user