dotfiles/bash/functions_internal.bash

23 lines
326 B
Bash
Raw Normal View History

2017-03-10 11:42:12 +01:00
function __bash_basedir {
local full=$(pwd)
2017-10-05 13:17:39 +02:00
if [ "$full" == "/" ]
2017-03-10 11:42:12 +01:00
then
echo $full
else
echo $full | rev | cut -d/ -f1 | rev
fi
}
function __bash_escape {
echo -ne "\e[$1m"
}
function __bash_is_empty {
2017-10-05 13:17:39 +02:00
if [ "$1" == "" ]
then
return 0
else
return 1
fi
2017-03-10 11:42:12 +01:00
}