Update bash_prompt
[config/bash.git] / .bash / aliases.d / ls
1 #!/bin/bash
2
3 if [ -x /usr/bin/dircolors ]; then
4   if command ls --color=auto /dev/null &> /dev/null;
5   then
6     if [ -r ~/.bash/dircolors ];
7     then
8       eval "$(dircolors -b ~/.bash/dircolors)"
9     else
10       eval "$(dircolors -b)"
11     fi
12     export LS_OPTIONS="--color=auto"
13   fi
14 fi
15
16 if command ls --show-control-chars /dev/null &> /dev/null;
17 then
18   LS_OPTIONS="$LS_OPTIONS --show-control-chars"
19 fi
20
21 if command ls -h /dev/null &> /dev/null;
22 then
23   LS_OPTIONS="$LS_OPTIONS -h"
24 fi
25
26 alias ls='LC_ALL=C ls $LS_OPTIONS'
27 alias ll='ls $LS_OPTIONS -al'
28 alias l='ls $LS_OPTIONS -l'