Add zshrc
This commit is contained in:
parent
d9a5a14642
commit
551e34c408
2 changed files with 56 additions and 2 deletions
36
.zshrc
Normal file
36
.zshrc
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Включаем автодополнение и автоподсказки
|
||||||
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
|
|
||||||
|
# Включаем подсветку синтаксиса
|
||||||
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
|
||||||
|
# Включаем oh-my-zsh и необходимые плагины
|
||||||
|
export ZSH="/usr/share/oh-my-zsh"
|
||||||
|
ZSH_THEME="robbyrussell"
|
||||||
|
plugins=(
|
||||||
|
#colored-man-pages
|
||||||
|
copypath
|
||||||
|
safe-paste
|
||||||
|
#ssh-agent
|
||||||
|
timer
|
||||||
|
)
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# История команд
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
HISTSIZE=1000
|
||||||
|
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
|
||||||
|
|
||||||
|
# Алиасы
|
||||||
|
alias f="fastfetch"
|
||||||
22
README.md
22
README.md
|
|
@ -1,2 +1,20 @@
|
||||||
# zshrc
|
# Установка
|
||||||
My zsh config
|
|
||||||
|
Надо скачать эти пакеты:
|
||||||
|
- `zsh`
|
||||||
|
- `zsh-autosuggestions`
|
||||||
|
- `zsh-syntax-highlighting`
|
||||||
|
- `zsh-history-substring-search`
|
||||||
|
- `oh-my-zsh`
|
||||||
|
|
||||||
|
Установить `zsh` как стандартный шел текущего пользователя:
|
||||||
|
```sh
|
||||||
|
chsh -s /usr/bin/zsh
|
||||||
|
```
|
||||||
|
Или
|
||||||
|
```sh
|
||||||
|
chsh -s /bin/zsh
|
||||||
|
```
|
||||||
|
Возможно вариант зависит от дистрибутива. Обычно используется первый вариант, но на Alpine Linux пришлось использовать второй. Надо просто путь до бинаря указать.
|
||||||
|
|
||||||
|
Потом создаём файл `~/.zshrc` и пишем туда содержимое файла `.zshrc` в данном репозитории. Сохраняем и пишем в терминал `source ~/.zshrc`. Настройки применятся и всё должно работать.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue