1
0
Fork 0
dotfiles/.config/zsh/configs/setup

40 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-03-29 16:15:06 +02:00
# vim:set ft=zsh
2023-06-12 11:04:23 +02:00
[ ! -f $XDG_DATA_HOME/zsh/history ] && mkdir -p $XDG_DATA_HOME/zsh && touch $XDG_DATA_HOME/zsh/history
2023-03-30 14:47:43 +02:00
2023-03-29 16:15:06 +02:00
setopt HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_VERIFY BANG_HIST interactive_comments autocd noflowcontrol longlistjobs nonomatch notify hash_list_all share_history histignorespace
2023-04-04 17:44:51 +02:00
autoload -Uz colors && colors
autoload -Uz edit-command-line && zle -N edit-command-line
autoload -Uz add-zsh-hook
autoload -Uz compinit
2023-03-29 16:15:06 +02:00
autoload -Uz edit-command-line
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots)
zle_highlight+=(paste:none)
2023-06-28 23:25:27 +02:00
# function write_venv(){
# echo -n "${VIRTUAL_ENV}" > "/tmp/current_venv-$$"
# }
# add-zsh-hook precmd write_venv
2023-03-29 16:15:06 +02:00
# Set the titlestring
2023-06-14 22:08:16 +02:00
function write_title_cmd() {
if [ ${1[(w)1]} != "lfwrap" ]; then
echo -ne "\033]0;$(print -P "%n@%m [%3~] » ${1[(w)1]}")\007"
fi
}
add-zsh-hook preexec write_title_cmd
2023-06-14 22:08:16 +02:00
function write_title_wd() { echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007" }
add-zsh-hook precmd write_title_wd
reset_beam() { echo -ne '\e[5 q' } # Use beam shape cursor for each new prompt.
# add-zsh-hook preexec reset_beam
2023-04-04 17:44:51 +02:00
whed() {
$EDITOR "$(which "$1")"
}