Compare commits
No commits in common. "a10c7e07ee498079c9812fa5abd029abad0f37ff" and "1db9e9af20523b98fc3becae2441252741c1a1e4" have entirely different histories.
a10c7e07ee
...
1db9e9af20
3 changed files with 11 additions and 29 deletions
12
.zshrc
12
.zshrc
|
@ -1,13 +1,5 @@
|
||||||
if [[ $TTY == *tty* ]]; then
|
if [[ $TTY == *tty* ]]; then
|
||||||
source ${HOME}/.zshrc.tty
|
source .zshrc.tty
|
||||||
else
|
else
|
||||||
source ${HOME}/.zshrc.graphic
|
source .zshrc.graphic
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f ${HOME}/.zshrc.local ]]; then
|
|
||||||
source ${HOME}/.zshrc.local
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f ${HOME}/.zshrc.koyeb ]]; then
|
|
||||||
source ${HOME}/.zshrc.koyeb
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,7 +14,7 @@ if [ -d "${HOME}/.config/zsh/completions" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### edit cmds
|
### edit cmds
|
||||||
export VISUAL=vim
|
export VISUAL=nvim
|
||||||
autoload edit-command-line
|
autoload edit-command-line
|
||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey "^X^E" edit-command-line
|
bindkey "^X^E" edit-command-line
|
||||||
|
@ -29,10 +29,6 @@ antidote load
|
||||||
|
|
||||||
#. ~/.zsh_plugins.zsh
|
#. ~/.zsh_plugins.zsh
|
||||||
|
|
||||||
# bash compat
|
|
||||||
autoload -U +X bashcompinit
|
|
||||||
bashcompinit
|
|
||||||
|
|
||||||
### fasd
|
### fasd
|
||||||
|
|
||||||
if which fasd > /dev/null; then
|
if which fasd > /dev/null; then
|
||||||
|
@ -83,10 +79,10 @@ if [[ ! -z $TMUX ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Editor
|
## Editor
|
||||||
export EDITOR=vim
|
export EDITOR=nvim
|
||||||
|
|
||||||
## Locale
|
## Locale
|
||||||
export LANG=en_US.UTF-8
|
export LANG=.UTF-8
|
||||||
export LANGUAGE=en_US
|
export LANGUAGE=en_US
|
||||||
export LC_CTYPE=en_US.UTF-8
|
export LC_CTYPE=en_US.UTF-8
|
||||||
export LC_NUMERIC=en_US.UTF-8
|
export LC_NUMERIC=en_US.UTF-8
|
||||||
|
@ -329,16 +325,14 @@ fi
|
||||||
### colored and fuzzy go doc
|
### colored and fuzzy go doc
|
||||||
if which bat > /dev/null; then
|
if which bat > /dev/null; then
|
||||||
function _godoc() {
|
function _godoc() {
|
||||||
local PAGE_LANG=go
|
|
||||||
local GO_LANG=go
|
|
||||||
if echo $1|grep -q -E "^([a-zA-Z0-9/]+)$"; then
|
if echo $1|grep -q -E "^([a-zA-Z0-9/]+)$"; then
|
||||||
go doc ${@} | bat -p -l ${PAGE_LANG}
|
go doc ${@} | bat -p -l md
|
||||||
elif echo $1|grep -q -E "^[a-zA-Z0-9/]+\.[a-zA-Z0-9.]+$"; then
|
elif echo $1|grep -q -E "^[a-zA-Z0-9/]+\.[a-zA-Z0-9.]+$"; then
|
||||||
go doc ${@} | bat -p -l ${GO_LANG}
|
go doc ${@} | bat -p -l go
|
||||||
elif echo $1|grep -q -E "^([a-zA-Z0-9/._-]+)/.*\.[a-zA-Z0-9.]+$"; then
|
elif echo $1|grep -q -E "^([a-zA-Z0-9/._-]+)/.*\.[a-zA-Z0-9.]+$"; then
|
||||||
go doc ${@} | bat -p -l ${GO_LANG}
|
go doc ${@} | bat -p -l go
|
||||||
else
|
else
|
||||||
go doc ${@} | bat -p -l ${PAGE_LANG}
|
go doc ${@} | bat -p -l md
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -434,10 +428,6 @@ function ,pkfr() {
|
||||||
# pkpr : extract clipboard content sent using the pkfr command
|
# pkpr : extract clipboard content sent using the pkfr command
|
||||||
alias ,pkpr='piknik -paste | tar xzpvf -'
|
alias ,pkpr='piknik -paste | tar xzpvf -'
|
||||||
|
|
||||||
### zoxide
|
|
||||||
|
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
|
|
||||||
# vim: set ft=zsh et sw=0 ts=2 sts=0:
|
# vim: set ft=zsh et sw=0 ts=2 sts=0:
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
|
|
@ -1381,6 +1381,7 @@ zle -N help-zle
|
||||||
## complete word from currently visible Screen or Tmux buffer.
|
## complete word from currently visible Screen or Tmux buffer.
|
||||||
if check_com -c screen || check_com -c tmux; then
|
if check_com -c screen || check_com -c tmux; then
|
||||||
function _complete_screen_display () {
|
function _complete_screen_display () {
|
||||||
|
[[ "$TERM" != "screen" ]] && return 1
|
||||||
|
|
||||||
local TMPFILE=$(mktemp)
|
local TMPFILE=$(mktemp)
|
||||||
local -U -a _screen_display_wordlist
|
local -U -a _screen_display_wordlist
|
||||||
|
@ -1391,9 +1392,8 @@ if check_com -c screen || check_com -c tmux; then
|
||||||
#works, but crashes tmux below version 1.4
|
#works, but crashes tmux below version 1.4
|
||||||
#luckily tmux -V option to ask for version, was also added in 1.4
|
#luckily tmux -V option to ask for version, was also added in 1.4
|
||||||
tmux -V &>/dev/null || return
|
tmux -V &>/dev/null || return
|
||||||
tmux -q capture-pane -b 0 \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
|
tmux -q capture-pane \; save-buffer -b 0 $TMPFILE \; delete-buffer -b 0
|
||||||
else
|
else
|
||||||
[[ "$TERM" != "screen" ]] && return
|
|
||||||
screen -X hardcopy $TMPFILE
|
screen -X hardcopy $TMPFILE
|
||||||
# screen sucks, it dumps in latin1, apparently always. so recode it
|
# screen sucks, it dumps in latin1, apparently always. so recode it
|
||||||
# to system charset
|
# to system charset
|
||||||
|
|
Loading…
Reference in a new issue