[NEW] bashrc: Add Mac helpers

This commit is contained in:
Andrea Rogers 2023-11-14 19:23:52 -06:00
commit 0a2dbe713c
2 changed files with 31 additions and 0 deletions

15
.bashrc Normal file
View file

@ -0,0 +1,15 @@
command -v port >/dev/null &&
command -v uname >/dev/null &&
[ $(uname) == 'Darwin' ] && . .bashrc.mac
simplefind() { find . -iname '*'"$@"'*'; }
simpleplay() {
find . -iname '*'"$@"'*' -print0 \
| xargs -0 mpv --no-audio-display \
;
}
# Python
alias mk-venv='python -m venv .venv'
alias do-venv='. .venv/bin/activate'
alias rm-venv='rm -rf .venv'

16
.bashrc.mac Normal file
View file

@ -0,0 +1,16 @@
alias ls='ls -G'
blsc() { alias ls='ls -G'; }
unuu-me() { PATH="$(sed 's/\/opt\/local\/libexec\/uutils://' <<<$PATH)"; blsc; }
ungnu-me() { PATH="$(sed 's/\/opt\/local\/libexec\/gnubin://' <<<$PATH)"; blsc; }
un-me() { ungnu-me; unuu-me; }
gnu-me() {
alias ls='ls --color'
PATH="/opt/local/libexec/gnubin:$PATH"
}
uu-me() {
alias ls='ls --color'
PATH="/opt/local/libexec/uutils:$PATH"
}