Created
October 14, 2023 20:47
-
-
Save bluedragon1221/5da1989fecfc203ea297d2a7c7ae5052 to your computer and use it in GitHub Desktop.
My aliasrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# doas | |
alias su="gum confirm 'root?' && sudo -s || echo 'never mind'" | |
# exa | |
alias ls="exa -a1 --icons --group-directories-first" | |
alias tree="exa -T" | |
# cd | |
alias cdtemp='cd $(mktemp -d)' | |
mkcd() { | |
mkdir -pv "$@" && cd "$_" || exit | |
} | |
# alias mkdir='mkcd' | |
# trash | |
trash() { | |
case "$1" in | |
-*) mv $2 ~/.local/share/trash/ ;; | |
*) mv $1 ~/.local/share/trash/ ;; | |
esac | |
} | |
alias rm="trash" | |
alias neofetch="pfetch" | |
alias stopwatch='time cat' | |
alias x='exit' | |
alias curl_wget="curl -JLO " | |
big() { | |
du -h $1 | awk '{print $1}' | |
} | |
man() { | |
/usr/bin/man $* | \ | |
col -b | \ | |
nvim -R -c 'set ft=man nomod nolist' - | |
} | |
add_alias() { | |
echo "$1" >> ~/.config/zsh/aliasrc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment