Compare commits

...

16 Commits

7 changed files with 61 additions and 9 deletions

View File

@ -27,6 +27,8 @@ export XDG_STATE_HOME="$HOME/.local/state"
export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
export ZSH_COMPDUMP="$ZSH_CACHE_DIR/zcompdump-${HOST/.*/}-$ZSH_VERSION"
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
# Короткое имя компьютера, обязательно нужно для ssh-agent.
# Часто используется в OhMyZsh.
export SHORT_HOST="${SHORT_HOST:-${(%):-%m}}"

30
15-options.zsh Normal file
View File

@ -0,0 +1,30 @@
# shellcheck shell=bash
# vim: ft=sh
setopt AUTO_PUSHD # Push the current directory visited on the stack.
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
autoload -Uz allopt zed zmv zcalc colors is-at-least
colors
zmodload zsh/terminfo
autoload -Uz edit-command-line
zle -N edit-command-line
autoload -Uz select-word-style
select-word-style shell
if [ -z ${DISABLE_MAGIC_FUNCTIONS+set} ]; then
if is-at-least 5.1; then
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
fi
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
fi
# Подсветка вывода основных команд
if [[ -r /etc/grc.zsh ]]; then source /etc/grc.zsh; fi

View File

@ -2,7 +2,7 @@
# vim: ft=sh
HISTFILE="$ZSH_CACHE_DIR/history"
HISTSIZE=100000
HISTSIZE=600000
SAVEHIST=500000
HISTDUP=erase

View File

@ -2,7 +2,7 @@
# vim: ft=sh
declare -A ZINIT
ZINIT[VERSION]="3.10.0"
ZINIT[VERSION]="3.14.0"
ZINIT[HOME_DIR]="$ZSH_CACHE_DIR/zinit-${ZINIT[VERSION]}"
ZINIT[PLUGINS_DIR]="$ZSH_CACHE_DIR/plugins"
ZINIT[SNIPPETS_DIR]="$ZSH_CACHE_DIR/snippets"

View File

@ -23,6 +23,8 @@ zinit snippet OMZL::clipboard.zsh
zinit snippet OMZL::key-bindings.zsh
zinit snippet OMZL::termsupport.zsh
zinit light marlonrichert/zsh-hist
if [ -x /usr/lib/command-not-found ]; then
zinit snippet OMZP::command-not-found
fi
@ -54,10 +56,14 @@ if command -v fzf > /dev/null 2>&1; then
FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
FZF_ALT_C_COMMAND="fd --type d"
fi
if is-at-least "0.34" "$(fzf --version | awk '{ print $1; }')"; then
zinit ice lucid wait'0' mv"completion.zsh -> _fzf" pick"_fzf" as"completion"
zinit snippet https://github.com/junegunn/fzf/blob/master/shell/completion.zsh
zinit snippet https://github.com/junegunn/fzf/blob/master/shell/key-bindings.zsh
FZF_VERSION="$(fzf --version | sed -r 's/([0-9]+\.[0-9]+).*/\1/' )"
zinit ice lucid wait'0' mv"completion.zsh -> _fzf" pick"_fzf" as"completion"
if is-at-least "0.54" "$FZF_VERSION"; then
zinit snippet "https://raw.githubusercontent.com/junegunn/fzf/refs/tags/v${FZF_VERSION}.0/shell/completion.zsh"
zinit snippet "https://raw.githubusercontent.com/junegunn/fzf/refs/tags/v${FZF_VERSION}.0/shell/key-bindings.zsh"
else
zinit snippet "https://raw.githubusercontent.com/junegunn/fzf/refs/tags/${FZF_VERSION}.0/shell/completion.zsh"
zinit snippet "https://raw.githubusercontent.com/junegunn/fzf/refs/tags/${FZF_VERSION}.0/shell/key-bindings.zsh"
fi
fi
@ -68,6 +74,7 @@ if command -v git > /dev/null 2>&1; then
zinit snippet OMZP::git-extras
zinit snippet OMZP::github
[ -z ${SSH_CONNECTION+set} ] && zinit snippet OMZP::git-auto-fetch
zinit light unixorn/git-extra-commands
fi
if command -v psql > /dev/null 2>&1; then

View File

@ -54,9 +54,9 @@ sudo usermod -s /usr/bin/zsh username
# Установка шрифтов
```sh
mkdir -p ~/.local/share/fonts
curl -fSL -o "$HOME/.local/share/fonts/Anonymice Nerd Font Complete.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/complete/Anonymice%20Nerd%20Font%20Complete.ttf
curl -fSL -o "$HOME/.local/share/fonts/Anonymice Nerd Font Complete Mono.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/complete/Anonymice%20Nerd%20Font%20Complete%20Mono.ttf
wget -A ".deb" -c -q -np -nd -r -l 1 https://deb.246060.ru/bin/fonts/pool/main/f/fonts-iosevka-prog/
wget -A ".deb" -c -q -np -nd -r -l 1 https://deb.246060.ru/bin/fonts/pool/main/f/fonts-iosevka-prog-nerd/
sudo dpkg -i fonts*deb
```
# Настройка агентов
@ -184,6 +184,13 @@ zu
source $HOME/.config/zsh/fixes.zsh
```
Если в системе установлена программа `fzf` версии ниже `0.53.0`, то может
не работать поиск по истории, файлам и автодополнение. Исправление:
```
fix-update-fzf
```
Для обеспечения поддержки терминала `kitty` на системах, где недоступно
его описание, можно выполнить команду:

View File

@ -24,3 +24,9 @@ fix-mc-kitty-support() {
fi
}
# Новые версии плагинов для поиска используют функционал fzf версии 0.54.1.
fix-update-fzf() {
mkdir -p $HOME/bin
wget -O- https://github.com/junegunn/fzf/releases/download/v0.54.1/fzf-0.54.1-linux_amd64.tar.gz | tar -zxf - -C $HOME/bin
}