scripts/functions_korn/get_branch

11 lines
195 B
Plaintext

# Mostrar rama actual en directorios de git
function get_branch {
BRANCH=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
if [[ ! -z ${BRANCH} ]]; then
print "${BRANCH}"
fi
unset BRANCH
}