mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-11-07 03:58:44 +00:00
Add zsh plugins and aliases
This commit is contained in:
+18
-1
@@ -6,11 +6,28 @@ alias ....="cd ../../../"
|
||||
|
||||
alias df1="du -h -d 1"
|
||||
|
||||
alias ls='ls -hG'
|
||||
# alias ls='ls -hG'
|
||||
alias ll='ls -alhFG'
|
||||
alias la='ls -AG'
|
||||
alias l='ls -CFG'
|
||||
|
||||
# eza aliases, if available
|
||||
if test $(which eza); then
|
||||
eza_params=(
|
||||
'--git' '--icons' '--group' '--group-directories-first'
|
||||
'--time-style=long-iso'
|
||||
)
|
||||
|
||||
alias ls='eza $eza_params'
|
||||
alias l='eza --git-ignore $eza_params'
|
||||
alias ll='eza --all --header --long $eza_params'
|
||||
alias llm='eza --all --header --long --sort=modified $eza_params'
|
||||
alias la='eza -lbhHigUmuSa'
|
||||
alias lx='eza -lbhHigUmuSa@'
|
||||
alias lt='eza --tree $eza_params'
|
||||
alias tree='eza --tree $eza_params'
|
||||
fi
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
[ -n "$PS1" ] && source ~/.bash_profile;
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
|
||||
+6
-1
@@ -1,7 +1,12 @@
|
||||
source $HOME/Git/zsh-git-prompt/zshrc.sh
|
||||
|
||||
function git_email_prompt() {
|
||||
GIT_USER=$(git config user.email)
|
||||
echo $GIT_USER
|
||||
}
|
||||
|
||||
PROMPT='%B%U%F{cyan}% %m%u%F{green} %~ $(git_super_status)%f %{%G%}%b '
|
||||
RPROMPT='%F{cyan}%*'
|
||||
RPROMPT='%B%F{42}% $(git_email_prompt)%f %F{cyan}%*%b'
|
||||
|
||||
# No right padding on RPROMPT
|
||||
ZLE_RPROMPT_INDENT=0
|
||||
|
||||
+26
-6
@@ -1,4 +1,4 @@
|
||||
ZDOTDIR=$HOME/.zsh
|
||||
ZDOTDIR=~/.zsh
|
||||
|
||||
source $ZDOTDIR/.zprompt
|
||||
|
||||
@@ -10,6 +10,8 @@ setopt GLOB_COMPLETE
|
||||
setopt correct
|
||||
setopt correct_all
|
||||
|
||||
setopt completeinword # not just at the end
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
|
||||
|
||||
@@ -17,7 +19,7 @@ autoload -Uz compinit && compinit
|
||||
# History
|
||||
# --------
|
||||
|
||||
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
|
||||
HISTFILE=${ZDOTDIR:-~}/.zsh_history
|
||||
SAVEHIST=50000
|
||||
HISTSIZE=10000
|
||||
HISTORY_IGNORE="(ls|cd|pwd|zsh|exit|cd ..)"
|
||||
@@ -38,16 +40,34 @@ setopt no_beep # Don't beep on command input error
|
||||
# --------
|
||||
|
||||
# Include functions
|
||||
fpath+=$HOME/Git/dotfiles/functions
|
||||
fpath+=~/Git/dotfiles/functions
|
||||
autoload extract
|
||||
|
||||
# Load bashcompinit for some old bash completions
|
||||
autoload bashcompinit && bashcompinit
|
||||
|
||||
source $ZDOTDIR/.zshrc.local
|
||||
source $HOME/.aliases
|
||||
source $HOME/.aliases.local
|
||||
source ~/.aliases
|
||||
source ~/.aliases.local
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# --------
|
||||
# Plugins
|
||||
# --------
|
||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source "$ZDOTDIR/zsh-vim-mode/zsh-vim-mode.plugin.zsh"
|
||||
|
||||
source "$ZDOTDIR/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh"
|
||||
|
||||
# https://github.com/arzzen/calc.plugin.zsh
|
||||
source "$ZDOTDIR/plugins/calc.plugin.zsh/calc.plugin.zsh"
|
||||
|
||||
# https://github.com/lukechilds/zsh-better-npm-completion
|
||||
source "$ZDOTDIR/plugins/.zsh-better-npm-completion/zsh-better-npm-completion.plugin.zsh"
|
||||
|
||||
# https://github.com/sunlei/zsh-ssh
|
||||
source "$ZDOTDIR/plugins/zsh-ssh/zsh-ssh.zsh"
|
||||
|
||||
|
||||
# https://github.com/Tarrasch/zsh-bd
|
||||
source "$ZDOTDIR/plugins/bd/bd.zsh"
|
||||
|
||||
Reference in New Issue
Block a user