zsh: Remove kitty specifics

This commit is contained in:
histalek 2021-07-10 17:02:00 +02:00
parent 3089823b4e
commit 638712aeb0
No known key found for this signature in database
GPG key ID: ED1D6449704FDE03
2 changed files with 2 additions and 31 deletions

View file

@ -7,17 +7,6 @@ alias updatealias='source $HOME/.zshrc'
## https://www.atlassian.com/git/tutorials/dotfiles ## https://www.atlassian.com/git/tutorials/dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
## ssh workaround for kitty terminal
alias ssh='sshKittyWorkaround'
function sshKittyWorkaround {
if [[ "$TERM" == "xterm-kitty" ]]; then
kitty +kitten ssh $argv;
else
"ssh" $argv;
fi
}
## navigation ## navigation
alias ..='cd ..' alias ..='cd ..'
alias ...='cd ../..' alias ...='cd ../..'

22
.zshrc
View file

@ -39,7 +39,6 @@ plugins=(
history history
pass pass
sudo sudo
zsh-interactive-cd
) )
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
@ -49,7 +48,8 @@ source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment # You may need to manually set your language environment
# export LANG=en_US.UTF-8 # export LANG=en_US.UTF-8
export EDITOR=/usr/bin/vim export EDITOR=/usr/bin/nvim
export VISUAL=/usr/bin/nvim
export HISTORY_IGNORE="(ls|cd|pwd|exit|history|cd -|cd ..)" export HISTORY_IGNORE="(ls|cd|pwd|exit|history|cd -|cd ..)"
export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANPAGER="sh -c 'col -bx | bat -l man -p'"
@ -57,23 +57,5 @@ setopt completealiases
prompt_context(){} prompt_context(){}
## compdef kitty
_kitty() {
local src
# Send all words up to the word the cursor is currently on
src=$(printf "%s
" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
if [[ $? == 0 ]]; then
eval ${src}
fi
}
compdef _kitty kitty
autoload -Uz compinit
compinit
# Completion for kitty
kitty + complete setup zsh | source /dev/stdin
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh