Skip to content

Commit

Permalink
fix: review and fix maxos issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 17, 2019
1 parent b77335b commit f5fd947
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
7 changes: 6 additions & 1 deletion 1bash.d/0_colors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ elif [ -f $ONE_BASH/dircolors ]; then
eval "$( dircolors -b $ONE_BASH/dircolors )"
fi

if ls --color=auto > /dev/null 2>&1; then colorflag="--color=auto"; else colorflag="-G"; fi;
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
colorflag="-G"
fi

# enable color support of ls and also add handy aliases
alias ls='ls $colorflag'
Expand Down
8 changes: 6 additions & 2 deletions 1bash.d/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ alias where=which # sometimes i forget
# export CLICOLOR_FORCE=1

# ls options: A = include hidden (but not . or ..), F = put `/` after folders, h = byte unit suffixes
alias lsa="ls -lAhF --group-directories-first"
alias lsd="ls | grep '^d'" # only directories
if lsa --group-directories-first > /dev/null 2>&1; then # GNU `ls`
alias lsa="ls -lAhF --group-directories-first"
else # OS X `ls`
alias lsa="ls -lAhF"
fi
alias lsd="ls | grep --color=never '^d'" # only directories
# `la` defined in .functions

# `cat` with beautiful colors. requires: sudo easy_install -U Pygments
Expand Down
4 changes: 0 additions & 4 deletions 1bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ for i in $ONE_BASH/1bash.d/*.sh; do
fi
done
unset i

if ! shopt -oq posix; then
lsa
fi
1 change: 1 addition & 0 deletions logo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

bbbbbbbb
1111111 b::::::b hhhhhhh
1::::::1 b::::::b h:::::h
Expand Down
5 changes: 5 additions & 0 deletions profile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ if [ "$BASH" ]; then
# if [ -f ~/.bashrc ]; then
# . ~/.bashrc
# fi

# if ! shopt -oq posix; then
# cd /srv
# lsa
# fi
fi

0 comments on commit f5fd947

Please sign in to comment.