From 4a72ec1c6956dbe1df1076d85646657598694d96 Mon Sep 17 00:00:00 2001 From: Andrea Rogers Date: Thu, 25 Apr 2024 07:42:47 +0000 Subject: [PATCH] Colorful ls on FreeBSD --- .bashrc | 2 ++ .bashrc.freebsd | 7 +++++++ GNUmakefile | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .bashrc.freebsd diff --git a/.bashrc b/.bashrc index 133e0b1..d486847 100644 --- a/.bashrc +++ b/.bashrc @@ -15,6 +15,8 @@ command -v uname >/dev/null && FreeBSD) [[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] \ && . /usr/local/share/bash-completion/bash_completion.sh + + . "$HOME/.bashrc.freebsd" ;; esac \ ; diff --git a/.bashrc.freebsd b/.bashrc.freebsd new file mode 100644 index 0000000..e7d0d0d --- /dev/null +++ b/.bashrc.freebsd @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +if [ -z "$PS1" ]; then + return +fi + +alias ls='ls -G' diff --git a/GNUmakefile b/GNUmakefile index 8a59be6..0d56219 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -13,7 +13,8 @@ ifeq ($(UNAME),Darwin) INSTALL = ginstall OPEN = open else ifeq ($(UNAME),FreeBSD) - DEFAULT_TARGETS += $(HOME)/.bashrc + DEFAULT_TARGETS += $(HOME)/.bashrc \ + $(HOME)/.bashrc.freebsd PROFILE = .profile INSTALL = ginstall OPEN = xdg-open @@ -45,6 +46,9 @@ $(HOME)/.profile: $(PROFILE) $(HOME)/.bashrc: .bashrc cp $< $@ +$(HOME)/.bashrc.freebsd: .bashrc.freebsd + cp $< $@ + /opt/local/etc/bashrc: .bashrc sudo cp $< $@