Compare commits

..

2 Commits

Author SHA1 Message Date
Valeriy Filippov
ea633fcb1f Upd readme 2026-03-06 15:16:41 +03:00
Valeriy Filippov
6aeee6d435 Add zsh 2026-03-06 15:16:33 +03:00
4 changed files with 162 additions and 4 deletions

5
.gitignore vendored
View File

@@ -9,4 +9,9 @@
nvim/lazy-lock.json nvim/lazy-lock.json
nvim/lazyvim.json nvim/lazyvim.json
!zsh/
zsh/*
!zsh/.zshrc
!zsh/README.md
!starship.toml !starship.toml

View File

@@ -6,7 +6,6 @@
## Installation ## Installation
### Brew ### Brew
https://brew.sh/ https://brew.sh/
```shell ```shell
@@ -14,7 +13,6 @@ https://brew.sh/
``` ```
### NeoVim ### NeoVim
https://github.com/neovim/neovim https://github.com/neovim/neovim
```shell ```shell
@@ -22,11 +20,9 @@ brew install neovim
``` ```
### Ghostty ### Ghostty
https://ghostty.org/download https://ghostty.org/download
### Starship ### Starship
https://starship.rs/ https://starship.rs/
```shell ```shell
@@ -40,3 +36,29 @@ plugins=(
... ...
) )
``` ```
### Bat
https://github.com/sharkdp/bat
```shell
brew install bat
```
### Eza
https://github.com/eza-community/eza
```shell
brew install eza
```
Add to `.zshrc`
```
plugins=(
...
eza
...
)
```
### Fzf
https://github.com/junegunn/fzf

117
zsh/.zshrc Normal file
View File

@@ -0,0 +1,117 @@
## Brew configuration
# used fix for git completions
# https://stackoverflow.com/a/77774933
# Init Homebrew to get `HOMEBREW_PREFIX`
eval "$(/opt/homebrew/bin/brew shellenv)"
# Delete brew's objectively worse git completion
remove_conflicting_git_completions() {
local git_completion_bash="$HOMEBREW_PREFIX/share/zsh/site-functions/git-completion.bash"
local git_completion_zsh="$HOMEBREW_PREFIX/share/zsh/site-functions/_git"
[ -e "$git_completion_bash" ] && rm "$git_completion_bash"
[ -e "$git_completion_zsh" ] && rm "$git_completion_zsh"
}
# This needs to run every time since brew sometimes brings those files back
remove_conflicting_git_completions
# Add Homebrew's site functions to fpath (minus git, because that causes conflicts)
# This will give you autocomplete for _other_ things you installed
# from brew (like `just`, or `exa`, or `k6`)
fpath=($HOMEBREW_PREFIX/share/zsh/site-functions $fpath)
# Path to your oh-my-zsh installation.
export ZSH="/Users/liquidpredator/.oh-my-zsh"
# Set name of the theme to load
#ZSH_THEME="dracula"
#Plugin configurations
zstyle ':omz:plugins:eza' 'dirs-first' yes
zstyle ':omz:plugins:eza' 'icons' yes
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
aws
docker
eza
fancy-ctrl-z
fzf
gcloud
gitfast
gitignore
helm
k9s
kubectl
mise
starship
terraform
thefuck
zoxide
zsh-autosuggestions
)
# Run oh-my-zsh
source $ZSH/oh-my-zsh.sh
## User configuration
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias vi="nvim"
alias vim="nvim"
alias vimdiff="nvim -d"
alias ovim="/usr/bin/vim"
alias vimz="nvim ~/.config/zsh/.zshrc"
alias vimn="nvim ~/.config/nvim"
alias gh="cd ~ && clear"
alias gw="cd ~/work && clear"
alias gp="cd ~/personal && clear"
# Functions
#Generate strong password
pwg() {
pwgen -cny -r \[\]\{\}\(\)\"\'\-\|\:\;\`\,\<\>\$\= 32 1
}
# Yazi
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# YandexCloud CLI completion
# NOTE: Versions checked from utility version output
source "$HOMEBREW_PREFIX/Caskroom/yandex-cloud-cli/$(yc --version | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")/yandex-cloud-cli/completion.zsh.inc"
# TFEnv yandex mirror
export TFENV_REMOTE=https://hashicorp-releases.yandexcloud.net
# Add Docker Desktop for Mac (docker)
export PATH="$PATH:/Applications/Docker.app/Contents/Resources/bin/"

14
zsh/README.md Normal file
View File

@@ -0,0 +1,14 @@
### Configuration
Create file `~/.zprofile` with content
```
export ZDOTDIR="$HOME/.config/zsh"
```
### Requirements
#### ohmyzsh
https://github.com/ohmyzsh/ohmyzsh
```shell
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```