[NEW] bashrc: Add Mac helpers
This commit is contained in:
parent
8c00b1e2f7
commit
0a2dbe713c
2 changed files with 31 additions and 0 deletions
15
.bashrc
Normal file
15
.bashrc
Normal 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
16
.bashrc.mac
Normal 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"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue