From fe91a2689048328607341417f0723d6fe619fef1 Mon Sep 17 00:00:00 2001 From: CI Date: Thu, 8 Jul 2021 21:19:03 +0000 Subject: [PATCH] Automated update for script library changes --- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../alpine/.devcontainer/library-scripts/common-alpine.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../bazel/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../dart/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../debian/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../dotnet/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../go/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../haskell/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../java/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../perl/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../php/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../r/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../ruby/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../rust/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../swift/.devcontainer/library-scripts/common-debian.sh | 7 ++----- .../ubuntu/.devcontainer/library-scripts/common-debian.sh | 7 ++----- 36 files changed, 72 insertions(+), 180 deletions(-) diff --git a/container-templates/docker-compose/.devcontainer/library-scripts/common-debian.sh b/container-templates/docker-compose/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/container-templates/docker-compose/.devcontainer/library-scripts/common-debian.sh +++ b/container-templates/docker-compose/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/container-templates/dockerfile/.devcontainer/library-scripts/common-debian.sh b/container-templates/dockerfile/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/container-templates/dockerfile/.devcontainer/library-scripts/common-debian.sh +++ b/container-templates/dockerfile/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/alpine/.devcontainer/library-scripts/common-alpine.sh b/containers/alpine/.devcontainer/library-scripts/common-alpine.sh index 93faf1df..702fafa5 100755 --- a/containers/alpine/.devcontainer/library-scripts/common-alpine.sh +++ b/containers/alpine/.devcontainer/library-scripts/common-alpine.sh @@ -215,15 +215,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/azure-ansible/.devcontainer/library-scripts/common-debian.sh b/containers/azure-ansible/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/azure-ansible/.devcontainer/library-scripts/common-debian.sh +++ b/containers/azure-ansible/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/azure-bicep/.devcontainer/library-scripts/common-debian.sh b/containers/azure-bicep/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/azure-bicep/.devcontainer/library-scripts/common-debian.sh +++ b/containers/azure-bicep/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/azure-cli/.devcontainer/library-scripts/common-debian.sh b/containers/azure-cli/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/azure-cli/.devcontainer/library-scripts/common-debian.sh +++ b/containers/azure-cli/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/azure-functions-dotnetcore-2.1/.devcontainer/library-scripts/common-debian.sh b/containers/azure-functions-dotnetcore-2.1/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/azure-functions-dotnetcore-2.1/.devcontainer/library-scripts/common-debian.sh +++ b/containers/azure-functions-dotnetcore-2.1/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/azure-terraform/.devcontainer/library-scripts/common-debian.sh b/containers/azure-terraform/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/azure-terraform/.devcontainer/library-scripts/common-debian.sh +++ b/containers/azure-terraform/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/bazel/.devcontainer/library-scripts/common-debian.sh b/containers/bazel/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/bazel/.devcontainer/library-scripts/common-debian.sh +++ b/containers/bazel/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/codespaces-linux/.devcontainer/library-scripts/common-debian.sh b/containers/codespaces-linux/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/codespaces-linux/.devcontainer/library-scripts/common-debian.sh +++ b/containers/codespaces-linux/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/dart/.devcontainer/library-scripts/common-debian.sh b/containers/dart/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/dart/.devcontainer/library-scripts/common-debian.sh +++ b/containers/dart/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/debian/.devcontainer/library-scripts/common-debian.sh b/containers/debian/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/debian/.devcontainer/library-scripts/common-debian.sh +++ b/containers/debian/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/docker-from-docker-compose/.devcontainer/library-scripts/common-debian.sh b/containers/docker-from-docker-compose/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/docker-from-docker-compose/.devcontainer/library-scripts/common-debian.sh +++ b/containers/docker-from-docker-compose/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/docker-from-docker/.devcontainer/library-scripts/common-debian.sh b/containers/docker-from-docker/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/docker-from-docker/.devcontainer/library-scripts/common-debian.sh +++ b/containers/docker-from-docker/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/docker-in-docker/.devcontainer/library-scripts/common-debian.sh b/containers/docker-in-docker/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/docker-in-docker/.devcontainer/library-scripts/common-debian.sh +++ b/containers/docker-in-docker/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/dotnet/.devcontainer/library-scripts/common-debian.sh b/containers/dotnet/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/dotnet/.devcontainer/library-scripts/common-debian.sh +++ b/containers/dotnet/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/go/.devcontainer/library-scripts/common-debian.sh b/containers/go/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/go/.devcontainer/library-scripts/common-debian.sh +++ b/containers/go/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/haskell/.devcontainer/library-scripts/common-debian.sh b/containers/haskell/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/haskell/.devcontainer/library-scripts/common-debian.sh +++ b/containers/haskell/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/java/.devcontainer/library-scripts/common-debian.sh b/containers/java/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/java/.devcontainer/library-scripts/common-debian.sh +++ b/containers/java/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/javascript-node/.devcontainer/library-scripts/common-debian.sh b/containers/javascript-node/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/javascript-node/.devcontainer/library-scripts/common-debian.sh +++ b/containers/javascript-node/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/jupyter-datascience-notebooks/.devcontainer/library-scripts/common-debian.sh b/containers/jupyter-datascience-notebooks/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/jupyter-datascience-notebooks/.devcontainer/library-scripts/common-debian.sh +++ b/containers/jupyter-datascience-notebooks/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/kubernetes-helm-minikube/.devcontainer/library-scripts/common-debian.sh b/containers/kubernetes-helm-minikube/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/kubernetes-helm-minikube/.devcontainer/library-scripts/common-debian.sh +++ b/containers/kubernetes-helm-minikube/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/kubernetes-helm/.devcontainer/library-scripts/common-debian.sh b/containers/kubernetes-helm/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/kubernetes-helm/.devcontainer/library-scripts/common-debian.sh +++ b/containers/kubernetes-helm/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/mit-scheme/.devcontainer/library-scripts/common-debian.sh b/containers/mit-scheme/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/mit-scheme/.devcontainer/library-scripts/common-debian.sh +++ b/containers/mit-scheme/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/perl/.devcontainer/library-scripts/common-debian.sh b/containers/perl/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/perl/.devcontainer/library-scripts/common-debian.sh +++ b/containers/perl/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/php/.devcontainer/library-scripts/common-debian.sh b/containers/php/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/php/.devcontainer/library-scripts/common-debian.sh +++ b/containers/php/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/powershell/.devcontainer/library-scripts/common-debian.sh b/containers/powershell/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/powershell/.devcontainer/library-scripts/common-debian.sh +++ b/containers/powershell/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/python-3-anaconda/.devcontainer/library-scripts/common-debian.sh b/containers/python-3-anaconda/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/python-3-anaconda/.devcontainer/library-scripts/common-debian.sh +++ b/containers/python-3-anaconda/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/python-3-miniconda/.devcontainer/library-scripts/common-debian.sh b/containers/python-3-miniconda/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/python-3-miniconda/.devcontainer/library-scripts/common-debian.sh +++ b/containers/python-3-miniconda/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/python-3-pypy/.devcontainer/library-scripts/common-debian.sh b/containers/python-3-pypy/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/python-3-pypy/.devcontainer/library-scripts/common-debian.sh +++ b/containers/python-3-pypy/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/python-3/.devcontainer/library-scripts/common-debian.sh b/containers/python-3/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/python-3/.devcontainer/library-scripts/common-debian.sh +++ b/containers/python-3/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/r/.devcontainer/library-scripts/common-debian.sh b/containers/r/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/r/.devcontainer/library-scripts/common-debian.sh +++ b/containers/r/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/ruby/.devcontainer/library-scripts/common-debian.sh b/containers/ruby/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/ruby/.devcontainer/library-scripts/common-debian.sh +++ b/containers/ruby/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/rust/.devcontainer/library-scripts/common-debian.sh b/containers/rust/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/rust/.devcontainer/library-scripts/common-debian.sh +++ b/containers/rust/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/swift/.devcontainer/library-scripts/common-debian.sh b/containers/swift/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/swift/.devcontainer/library-scripts/common-debian.sh +++ b/containers/swift/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]' diff --git a/containers/ubuntu/.devcontainer/library-scripts/common-debian.sh b/containers/ubuntu/.devcontainer/library-scripts/common-debian.sh index 80d8af6a..426a49be 100755 --- a/containers/ubuntu/.devcontainer/library-scripts/common-debian.sh +++ b/containers/ubuntu/.devcontainer/library-scripts/common-debian.sh @@ -291,15 +291,12 @@ __bash_prompt() { && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \ && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`' local gitbranch='`\ - export BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); \ - if [ "${BRANCH}" = "HEAD" ]; then \ - export BRANCH=$(git describe --contains --all HEAD 2>/dev/null); \ - fi; \ + export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \ if [ "${BRANCH}" != "" ]; then \ echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \ && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \ echo -n " \[\033[1;33m\]✗"; \ - fi \ + fi \ && echo -n "\[\033[0;36m\]) "; \ fi`' local lightblue='\[\033[1;34m\]'