new arch zsh config
This commit is contained in:
parent
c7905a4b87
commit
ff5b49dae1
2 changed files with 39 additions and 26 deletions
35
.zshrc
35
.zshrc
|
|
@ -5,15 +5,36 @@ ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
|||
# Включаем подсветку синтаксиса
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
# История поиска по подстроке
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
bindkey "^[[A" history-substring-search-up
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "^[[B" history-substring-search-down
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
|
||||
# Kitty shell integration
|
||||
if test -n "$KITTY_INSTALLATION_DIR"; then
|
||||
export KITTY_SHELL_INTEGRATION="no-rc"
|
||||
autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
|
||||
kitty-integration
|
||||
unfunction kitty-integration
|
||||
fi
|
||||
|
||||
# Включаем oh-my-zsh и необходимые плагины
|
||||
export ZSH="/usr/share/oh-my-zsh"
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
ZSH_THEME="robbyrussell"
|
||||
plugins=(
|
||||
#colored-man-pages
|
||||
bgnotify
|
||||
colored-man-pages
|
||||
copypath
|
||||
dirhistory
|
||||
extract
|
||||
fzf
|
||||
safe-paste
|
||||
#ssh-agent
|
||||
ssh-agent
|
||||
timer
|
||||
universalarchive
|
||||
zoxide
|
||||
)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
|
@ -24,13 +45,7 @@ SAVEHIST=1000
|
|||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
|
||||
# Настройки history-substring-search
|
||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
bindkey "^[[A" history-substring-search-up
|
||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "^[[B" history-substring-search-down
|
||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
# Алиасы
|
||||
alias f="fastfetch"
|
||||
|
|
|
|||
24
README.md
24
README.md
|
|
@ -1,20 +1,18 @@
|
|||
# Установка
|
||||
|
||||
Надо скачать эти пакеты:
|
||||
- `zsh`
|
||||
- `zsh-autosuggestions`
|
||||
- `zsh-syntax-highlighting`
|
||||
- `zsh-history-substring-search`
|
||||
- `oh-my-zsh`
|
||||
Скачать пакеты
|
||||
```sh
|
||||
sudo pacman -Sy zsh zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search zoxide fzf fastfetch
|
||||
```
|
||||
|
||||
Установить `zsh` как стандартный шел текущего пользователя:
|
||||
Скачать [oh-my-zsh](https://ohmyz.sh/#install)
|
||||
```sh
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
```
|
||||
|
||||
Установить `zsh` как стандартный шел текущего пользователя (если команда выше сама это не сделала):
|
||||
```sh
|
||||
chsh -s /usr/bin/zsh
|
||||
```
|
||||
Или
|
||||
```sh
|
||||
chsh -s /bin/zsh
|
||||
```
|
||||
Возможно вариант зависит от дистрибутива. Обычно используется первый вариант, но на Alpine Linux пришлось использовать второй. Надо просто путь до бинаря указать.
|
||||
|
||||
Потом создаём файл `~/.zshrc` и пишем туда содержимое файла `.zshrc` в данном репозитории. Сохраняем и пишем в терминал `source ~/.zshrc`. Настройки применятся и всё должно работать.
|
||||
Потом создаём файл (если уже создан, то заменить его содержимое) `~/.zshrc` и пишем туда содержимое файла `.zshrc` в данном репозитории. Сохраняем и пишем в терминал `source ~/.zshrc`. Настройки применятся и всё должно работать.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue