aboutsummaryrefslogtreecommitdiffstats
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/Makefile17
-rw-r--r--coreutils/bash-aliases5
-rw-r--r--coreutils/bash-bashrc51
3 files changed, 73 insertions, 0 deletions
diff --git a/coreutils/Makefile b/coreutils/Makefile
new file mode 100644
index 0000000..9058e3e
--- /dev/null
+++ b/coreutils/Makefile
@@ -0,0 +1,17 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config/bash/aliases.d
+ mkdir -p -- ~/.config/bash/bashrc.d
+ test ! -d ~/.config/bash/aliases.d/coreutils
+ test ! -d ~/.config/bash/bashrc.d/coreutils
+ ln -sf -- ~/.dotfiles/coreutils/bash-aliases ~/.config/bash/aliases.d/coreutils
+ ln -sf -- ~/.dotfiles/coreutils/bash-bashrc ~/.config/bash/bashrc.d/coreutils
+
+uninstall:
+ -unlink -- ~/.config/bash/aliases.d/coreutils
+ -unlink -- ~/.config/bash/bashrc.d/coreutils
+ -rmdir -- ~/.config/bash/aliases.d
+ -rmdir -- ~/.config/bash/bashrc.d
+
+.PHONY: install uninstall
diff --git a/coreutils/bash-aliases b/coreutils/bash-aliases
new file mode 100644
index 0000000..378c1d7
--- /dev/null
+++ b/coreutils/bash-aliases
@@ -0,0 +1,5 @@
+# -*- shell-script -*-
+
+#DESCRIPTION: Use colours in ls when the output is not piped
+
+alias ls='ls --color=auto'
diff --git a/coreutils/bash-bashrc b/coreutils/bash-bashrc
new file mode 100644
index 0000000..c4df04b
--- /dev/null
+++ b/coreutils/bash-bashrc
@@ -0,0 +1,51 @@
+# -*- shell-script -*-
+
+# lc = left of colour sequence (default = "\033[")
+# rc = right of colour sequence (default = "m")
+# en = end color (replaced lc+no+rc; default = NULL)
+# cl = clear to end of line (default = "\033[K")
+# rs = reset to ordinary colors (default = "0")
+
+# no = normal (global default)
+# di = directory
+# fi = regular file
+# ex = executable regular file
+# pi = named pipe (FIFO)
+# bd = block device
+# cd = character device
+# ln = symbolic link
+# or = orphaned symbolic link (points to a file that no longer exists)
+# mi = missing file (a missing file that an orphan symbolic link points to)
+# so = socket
+# do = door
+# su = setuid
+# sg = setgid
+# st = sticky
+# ow = other-writable
+# tw = ow (other-writable) + st (sticky)
+# ca = ???
+# mh = ???
+
+export LS_COLORS=\
+"di=1;34:"\
+"fi=0:"\
+"ex=1;32:"\
+"pi=42;30:"\
+"bd=46;37:"\
+"cd=46;30:"\
+"ln=1;36:"\
+"or=1;31:"\
+"mi=1;31:"\
+"so=41;37:"\
+"do=41;30:"\
+"su=1;45;7:"\
+"sg=1;35:"\
+"st=31:"\
+"ow=32:"\
+"tw=33:"\
+"$(printf "*.%s=34:" tar tgz arj taz lzh lzma tlz txz zip z Z dz gz lz xz bz2 bz tbz tbz2 tz deb rpm jar war ear sar rar
+ ace zoo cpio 7z rz zst dmg)"\
+"$(printf "*.%s=35:" jpg jpeg gif bmp pbm pgm ppm tga zbm xpm tif tiff png svg svgz mng pcx mov mpg mpeg m2v mkc webm ogm
+ mp4 m4v mp4v vob nuv wmv asf rm rmvb flv avi fli flv gl dl xcf xwd yuv cgm emf axv anx ogv ogx pam
+ ff webm webp)"\
+"$(printf "*.%s=36:" aac au flc flac m4a mid midi mka mp3 mpc ogg ra wav axa oga spx xsdf opus)"