Add some helpful functions
This commit is contained in:
parent
8e7de7e3b1
commit
87e982704c
@ -1,2 +1,6 @@
|
|||||||
rogue.save
|
rogue.save
|
||||||
rogue.scr
|
rogue.scr
|
||||||
|
xenia.log
|
||||||
|
discord_utils.log
|
||||||
|
discord_krisp.log
|
||||||
|
VirtualBoxVM.dxvk-cache
|
||||||
|
17
dot_zshrc
17
dot_zshrc
@ -16,13 +16,26 @@ bindkey '^[[F' end-of-line
|
|||||||
bindkey "^[[3~" delete-char
|
bindkey "^[[3~" delete-char
|
||||||
|
|
||||||
# Set aliases
|
# Set aliases
|
||||||
alias ls="eza --icons --long"
|
|
||||||
alias grep="ugrep"
|
alias grep="ugrep"
|
||||||
alias cd="z"
|
alias cd="z"
|
||||||
alias cat="bat -p"
|
alias cat="bat -p"
|
||||||
alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist"
|
alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist"
|
||||||
alias update="paru; flatpak update"
|
alias update="paru; flatpak update"
|
||||||
alias l="ls --ignore-glob '$([ -f .hidden ] && cat .hidden | tr '\n' '|')'"
|
function ls {
|
||||||
|
if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then
|
||||||
|
eza --icons --long $@
|
||||||
|
else
|
||||||
|
eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function .re-add {
|
||||||
|
chezmoi re-add
|
||||||
|
chezmoi git diff
|
||||||
|
if $(read -q "?Commit changes? [y/N]"); then
|
||||||
|
chezmoi git commit -- -am $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Helpful tool: https://zsh-prompt-generator.site/
|
# Helpful tool: https://zsh-prompt-generator.site/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user