bashrc: Add bash_completion on FreeBSD
This commit is contained in:
parent
4f718627d6
commit
ed2a5500ec
1 changed files with 12 additions and 4 deletions
16
.bashrc
16
.bashrc
|
|
@ -1,12 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
command -v port >/dev/null &&
|
|
||||||
command -v uname >/dev/null &&
|
|
||||||
[ $(uname) == 'Darwin' ] && . /opt/local/etc/bashrc.mac
|
|
||||||
|
|
||||||
simplefind() { find . -iname '*'"$@"'*'; }
|
simplefind() { find . -iname '*'"$@"'*'; }
|
||||||
simpleplay() {
|
simpleplay() {
|
||||||
find . -iname '*'"$@"'*' -print0 \
|
find . -iname '*'"$@"'*' -print0 \
|
||||||
| xargs -0 mpv --no-audio-display \
|
| xargs -0 mpv --no-audio-display \
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command -v uname >/dev/null &&
|
||||||
|
case $(uname) in
|
||||||
|
Darwin)
|
||||||
|
command -v port >/dev/null && . /opt/local/etc/bashrc.mac
|
||||||
|
;;
|
||||||
|
FreeBSD)
|
||||||
|
[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] \
|
||||||
|
&& . /usr/local/share/bash-completion/bash_completion.sh
|
||||||
|
;;
|
||||||
|
esac \
|
||||||
|
;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue