Colorful ls on FreeBSD

This commit is contained in:
Andrea Rogers 2024-04-25 07:42:47 +00:00
commit 4a72ec1c69
3 changed files with 14 additions and 1 deletions

View file

@ -15,6 +15,8 @@ command -v uname >/dev/null &&
FreeBSD) FreeBSD)
[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] \ [[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] \
&& . /usr/local/share/bash-completion/bash_completion.sh && . /usr/local/share/bash-completion/bash_completion.sh
. "$HOME/.bashrc.freebsd"
;; ;;
esac \ esac \
; ;

7
.bashrc.freebsd Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if [ -z "$PS1" ]; then
return
fi
alias ls='ls -G'

View file

@ -13,7 +13,8 @@ ifeq ($(UNAME),Darwin)
INSTALL = ginstall INSTALL = ginstall
OPEN = open OPEN = open
else ifeq ($(UNAME),FreeBSD) else ifeq ($(UNAME),FreeBSD)
DEFAULT_TARGETS += $(HOME)/.bashrc DEFAULT_TARGETS += $(HOME)/.bashrc \
$(HOME)/.bashrc.freebsd
PROFILE = .profile PROFILE = .profile
INSTALL = ginstall INSTALL = ginstall
OPEN = xdg-open OPEN = xdg-open
@ -45,6 +46,9 @@ $(HOME)/.profile: $(PROFILE)
$(HOME)/.bashrc: .bashrc $(HOME)/.bashrc: .bashrc
cp $< $@ cp $< $@
$(HOME)/.bashrc.freebsd: .bashrc.freebsd
cp $< $@
/opt/local/etc/bashrc: .bashrc /opt/local/etc/bashrc: .bashrc
sudo cp $< $@ sudo cp $< $@