Made bash config reflect zsh config
This commit is contained in:
parent
d18692b13d
commit
4a7b82cf28
2 changed files with 15 additions and 50 deletions
38
bash/.bashrc
38
bash/.bashrc
|
|
@ -53,16 +53,6 @@ path_clean() {
|
||||||
export PATH="$path"
|
export PATH="$path"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Auto-update and other bash settings
|
|
||||||
DISABLE_UPDATE_PROMPT=true
|
|
||||||
|
|
||||||
# Miscellaneous configurations
|
|
||||||
# Uncomment to use case-sensitive completion
|
|
||||||
# CASE_SENSITIVE="true"
|
|
||||||
|
|
||||||
# Uncomment to use hyphen-insensitive completion
|
|
||||||
# HYPHEN_INSENSITIVE="true"
|
|
||||||
|
|
||||||
# Load bash completion
|
# Load bash completion
|
||||||
if [[ -f /etc/bash_completion ]]; then
|
if [[ -f /etc/bash_completion ]]; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
|
|
@ -70,35 +60,19 @@ fi
|
||||||
|
|
||||||
# Custom aliases
|
# Custom aliases
|
||||||
alias python="python3"
|
alias python="python3"
|
||||||
alias v="nvim"
|
|
||||||
alias cat="bat --paging=never"
|
|
||||||
alias grep="grep --color=auto"
|
alias grep="grep --color=auto"
|
||||||
alias ls='eza --group-directories-first --color=auto'
|
|
||||||
alias la='eza -la --group-directories-first --color=auto'
|
|
||||||
alias ll='eza -l --group-directories-first --color=auto'
|
|
||||||
alias lt='eza -lt modified --sort newest'
|
|
||||||
alias lS='eza -lS --group-directories-first --color=auto'
|
|
||||||
alias tree='eza --tree --level=3'
|
|
||||||
alias lg='eza --git'
|
|
||||||
alias bathelp='bat --plain --language=help'
|
|
||||||
help() {
|
|
||||||
"$@" --help 2>&1 | bathelp
|
|
||||||
}
|
|
||||||
|
|
||||||
# Custom Apt udpate and upgrade
|
if [[ -f "$HOME/.local/bin/scripts/check_aliases" ]]; then
|
||||||
alias update='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade'
|
. "$HOME/.local/bin/scripts/check_aliases"
|
||||||
|
fi
|
||||||
# Overwriting -h and --help with bat highlights
|
|
||||||
alias -g :h='-h 2>&1 | bat --language=help --style=plain'
|
|
||||||
alias -g :help='--help 2>&1 | bat --language=help --style=plain'
|
|
||||||
|
|
||||||
# Set the default editor
|
# Set the default editor
|
||||||
export EDITOR='nvim'
|
export EDITOR='nvim'
|
||||||
|
|
||||||
# Add eza completions to FPATH
|
# Add eza completions to BASH_COMPLETION
|
||||||
[[ ! "$FPATH" =~ (^|:)${HOME}/.local/bin/eza/completions/bash(:|$) ]] && export FPATH="$HOME/.local/bin/eza/completions/bash:$FPATH"
|
[[ ! "$BASH_COMPLETION" =~ (^|:)${HOME}/.local/bin/eza/completions/bash(:|$) ]] && export BASH_COMPLETION="$HOME/.local/bin/eza/completions/bash:$BASH_COMPLETION"
|
||||||
|
|
||||||
# Initialize zoxide (replace with bash equivalent if necessary)
|
# Initialize zoxide
|
||||||
eval "$(zoxide init bash)"
|
eval "$(zoxide init bash)"
|
||||||
|
|
||||||
path_clean
|
path_clean
|
||||||
|
|
|
||||||
25
zsh/.zshrc
25
zsh/.zshrc
|
|
@ -117,10 +117,10 @@ plugins=(
|
||||||
docker
|
docker
|
||||||
zsh-syntax-highlighting
|
zsh-syntax-highlighting
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
|
colored-man-pages
|
||||||
macos
|
macos
|
||||||
autoupdate
|
autoupdate
|
||||||
zoxide
|
zoxide
|
||||||
eza
|
|
||||||
)
|
)
|
||||||
export ZSH_AUTOSUGGEST_STRATEGY=(
|
export ZSH_AUTOSUGGEST_STRATEGY=(
|
||||||
history
|
history
|
||||||
|
|
@ -161,24 +161,15 @@ fi
|
||||||
|
|
||||||
# Custom aliases
|
# Custom aliases
|
||||||
alias python="python3"
|
alias python="python3"
|
||||||
alias v="nvim"
|
|
||||||
alias cat="bat --paging=never"
|
|
||||||
alias grep="grep --color=auto"
|
alias grep="grep --color=auto"
|
||||||
alias ls='eza --group-directories-first --color=auto'
|
|
||||||
alias la='eza -la --group-directories-first --color=auto'
|
|
||||||
alias ll='eza -l --group-directories-first --color=auto'
|
|
||||||
alias lt='eza -lt modified --sort newest'
|
|
||||||
alias lS='eza -lS --group-directories-first --color=auto'
|
|
||||||
alias tree='eza --tree --level=3'
|
|
||||||
alias lg='eza --git'
|
|
||||||
alias bathelp='bat --plain --language=help'
|
|
||||||
help() {
|
|
||||||
"$@" --help 2>&1 | bathelp
|
|
||||||
}
|
|
||||||
|
|
||||||
# Overwriting -h and --help with bat highlights
|
alias update_omz="omz update && update_oh_my_zsh_custom"
|
||||||
alias -g :h='-h 2>&1 | bat --language=help --style=plain'
|
|
||||||
alias -g :help='--help 2>&1 | bat --language=help --style=plain'
|
if [[ -f ~/.local/bin/scripts/check_aliases ]]; then
|
||||||
|
source ~/.local/bin/scripts/check_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Add eza completions to FPATH
|
# Add eza completions to FPATH
|
||||||
[[ ! "$FPATH" =~ (^|:)${HOME}/.local/bin/eza/completions/zsh(:|$) ]] && export FPATH="$HOME/.local/bin/eza/completions/zsh:$FPATH"
|
[[ ! "$FPATH" =~ (^|:)${HOME}/.local/bin/eza/completions/zsh(:|$) ]] && export FPATH="$HOME/.local/bin/eza/completions/zsh:$FPATH"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue