Initial commit
This commit is contained in:
46
zsh/.oh-my-zsh/custom/aliases.zsh
Normal file
46
zsh/.oh-my-zsh/custom/aliases.zsh
Normal file
@@ -0,0 +1,46 @@
|
||||
is_debian_based() {
|
||||
# Checking /etc/os-release
|
||||
if [[ -f /etc/os-release ]]; then
|
||||
. /etc/os-release
|
||||
if [[ "$ID_LIKE" == *"debian"* ]] || [[ "$ID" == "debian" ]]; then
|
||||
return 0 # OK: Debian-based
|
||||
fi
|
||||
fi
|
||||
|
||||
# Alternative check: /etc/debian_version
|
||||
if [[ -f /etc/debian_version ]]; then
|
||||
return 0 # OK: Debian-based
|
||||
fi
|
||||
|
||||
return 1 # NO Debian-based
|
||||
}
|
||||
|
||||
alias ls="eza --color=always --group-directories-first --icons"
|
||||
|
||||
# Replace some more things with better alternatives
|
||||
if is_debian_based; then
|
||||
alias bat='batcat'
|
||||
alias fd='fdfind'
|
||||
fi
|
||||
|
||||
alias cat='bat --style header --style snip --style changes --style header --pager never'
|
||||
|
||||
# Replace df command tool
|
||||
alias df='duf'
|
||||
|
||||
# Replace Vim implementation
|
||||
alias vi='nvim'
|
||||
alias vim='nvim'
|
||||
|
||||
# Replace grep command tool
|
||||
alias grep='ugrep --color=auto'
|
||||
alias egrep='ugrep -E --color=auto'
|
||||
alias fgrep='ugrep -F --color=auto'
|
||||
|
||||
# Other aliases
|
||||
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
|
||||
alias userlist="cut -d: -f1 /etc/passwd | sort"
|
||||
alias ip='ip -color'
|
||||
alias pbcopy='xsel --clipboard --input'
|
||||
alias pbpaste='xsel --clipboard --output'
|
||||
alias stow='stow -d $DOTFILES '
|
||||
1
zsh/.oh-my-zsh/custom/plugins/fzf
Submodule
1
zsh/.oh-my-zsh/custom/plugins/fzf
Submodule
Submodule zsh/.oh-my-zsh/custom/plugins/fzf added at 4efcc344c3
Submodule zsh/.oh-my-zsh/custom/plugins/zsh-autosuggestions added at 85919cd1ff
Submodule zsh/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting added at 5eb677bb0f
Reference in New Issue
Block a user