Better gnu util handling

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-10-28 07:22:31 +01:00
parent 0eb4663dab
commit 64fe2474da
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
4 changed files with 11 additions and 4 deletions

1
home/.bin/date Symbolic link
View File

@ -0,0 +1 @@
/opt/homebrew/bin//gdate

1
home/.bin/readlink Symbolic link
View File

@ -0,0 +1 @@
/opt/homebrew/bin//greadlink

1
home/.bin/sed Symbolic link
View File

@ -0,0 +1 @@
/opt/homebrew/bin//gsed

View File

@ -10,8 +10,9 @@ alias _find=`which find`
alias _top=`which top`
alias _ps="/bin/ps"
alias _dig=`which dig`
alias _readlink=`which readlink`
alias _sed=`which sed`
alias _readlink=`/usr/bin/readlink`
alias _sed=`/usr/bin/sed`
alias _date=`/bin/date`
alias _git=`which git`
if command -v $(brew --prefix)/bin/git &>/dev/null; then
alias _git=$(brew --prefix)/bin/git
@ -36,8 +37,11 @@ alias kctx='switch'
alias machine-info='macchina -t Boron --bar'
alias watch='watch '
alias tmp='cd $(mktemp -d)'
alias sed='gsed'
which greadlink &>/dev/null && alias readlink=`which greadlink`
# Ensure GNU version of tools are used by default (symlink so they are picked up in scripts also)
which greadlink &>/dev/null && ln -sfn `which greadlink` ~/.bin/readlink
which gsed &>/dev/null && ln -sfn `which gsed` ~/.bin/sed
which gdate &>/dev/null && ln -sfn `which gdate` ~/.bin/date
lt() {
DEPTH=$(echo $1 | grep "^[0-9]*$")