fix zshrc a little
This commit is contained in:
parent
ce236b9262
commit
549f15f7d8
6 changed files with 13 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
# docker
|
||||
if [ -x "$(which docker)" ]; then
|
||||
if type docker &>/dev/null; then
|
||||
alias dc='docker compose'
|
||||
|
||||
alias killdocker='docker kill $(docker ps -q)'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# pacman and yay
|
||||
if [ -x "$(which pacman)" ]; then
|
||||
if type pacman &>/dev/null; then
|
||||
alias spa='sudo pacman -S'
|
||||
alias spaa='sudo pacman -S --overwrite="*"'
|
||||
alias spu='sudo pacman -Syyuu'
|
||||
|
@ -7,7 +7,7 @@ if [ -x "$(which pacman)" ]; then
|
|||
alias spr='sudo pacman -R'
|
||||
fi
|
||||
|
||||
if [ -x "$(which yay)" ]; then
|
||||
if type yay &>/dev/null; then
|
||||
alias ys='yay -S'
|
||||
alias yss='yay -S --overwrite="*"'
|
||||
alias yr='yay -R'
|
||||
|
@ -15,7 +15,7 @@ if [ -x "$(which yay)" ]; then
|
|||
fi
|
||||
|
||||
# brew
|
||||
if [ -x "$(which pacman)" ]; then
|
||||
if type brew &>/dev/null; then
|
||||
alias bu='brew update && brew update --cask'
|
||||
alias bup='brew upgrade && brew upgrade --cask'
|
||||
alias bd='brew doctor'
|
||||
|
|
|
@ -11,7 +11,7 @@ alias e='exit'
|
|||
alias grep='grep --color=auto'
|
||||
|
||||
# ls
|
||||
if [ -x "$(which exa)" ]; then
|
||||
if type exa &>/dev/null; then
|
||||
alias ls='exa --icons -g'
|
||||
lst() { exa --no-icons --sort=time | head --lines=1; }
|
||||
fi
|
||||
|
@ -29,7 +29,7 @@ alias pip='python3 -m pip'
|
|||
alias ipy='ipython --TerminalInteractiveShell.editing_mode=vi --TerminalInteractiveShell.timeoutlen=0.2'
|
||||
|
||||
# vim
|
||||
if [ -x "$(which nvim)" ]; then
|
||||
if type nvim &>/dev/null; then
|
||||
alias vim='nvim'
|
||||
fi
|
||||
alias v='vim'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# fzf settings
|
||||
if [ ! -z "$(which fzf 2>/dev/null)" ]; then
|
||||
if type fzf &>/dev/null; then
|
||||
export FZF_DEFAULT_OPTS="--reverse --bind change:first --bind ctrl-j:down,ctrl-k:up -i --cycle --header-first --border rounded"
|
||||
source <(fzf --zsh)
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# run neofetch or tmux if available
|
||||
if [ ! -z "$(which tmux 2>/dev/null)" ]; then
|
||||
if type tmux &>/dev/null; then
|
||||
if [ ! -n "$TMUX" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
|
|
18
.zshrc
18
.zshrc
|
@ -70,9 +70,10 @@ setopt HIST_IGNORE_ALL_DUPS
|
|||
setopt INC_APPEND_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
# Basic auto/tab complete:
|
||||
# load brew specific thinys
|
||||
if type brew &>/dev/null; then
|
||||
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
autoload -Uz compinit
|
||||
|
@ -192,8 +193,8 @@ bindkey '^R' history-incremental-search-backward
|
|||
bindkey '\eOH' beginning-of-line
|
||||
bindkey '\eOF' end-of-line
|
||||
|
||||
# IMPORTA
|
||||
if [ ! -z "$(which nvim 2>/dev/null)" ]; then
|
||||
# editor
|
||||
if type nvim &>/dev/null; then
|
||||
export EDITOR=nvim
|
||||
else
|
||||
export EDITOR=vim
|
||||
|
@ -208,16 +209,7 @@ bindkey '^ ' autosuggest-accept
|
|||
bindkey '^l' autosuggest-accept
|
||||
|
||||
# exports - local bin, python, brew
|
||||
export PATH="$HOME/.local/bin:$HOME/.bin:/Users/$USER/Library/Python/3.9/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/opt/libpq/bin:/opt/homebrew/bin:/opt/homebrew/sbin:$HOME/.cargo/bin:$PATH"
|
||||
|
||||
# mysql client on macos
|
||||
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
|
||||
export PATH="/opt/homebrew/opt/dotnet@6/bin:$PATH"
|
||||
export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
|
||||
export PATH="${HOME}/go/bin/:$PATH"
|
||||
export LDFLAGS="-L/opt/homebrew/opt/mysql-client/lib"
|
||||
export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
|
||||
export PATH="$HOME/.local/bin:$HOME/.bin:$HOME/.cargo/bin:${HOME}/go/bin/:/opt/homebrew/bin:$PATH:$PATH"
|
||||
|
||||
# Load aliases and shortcuts if existent.
|
||||
if [ -d "$HOME/.config/aliasrc" ]; then
|
||||
|
|
Loading…
Reference in a new issue