From d932529e8cefdd4466f24d67e106b44c57c1adbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 9 Jun 2025 01:04:22 +0200 Subject: [PATCH] feat(bin): starship script to list remote icon --- .local/bin/check-git-remote | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .local/bin/check-git-remote diff --git a/.local/bin/check-git-remote b/.local/bin/check-git-remote new file mode 100755 index 00000000..de24b061 --- /dev/null +++ b/.local/bin/check-git-remote @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +GIT_REMOTE=$(command git ls-remote --get-url 2>/dev/null) +if [[ "$GIT_REMOTE" =~ "github" ]]; then + GIT_REMOTE_SYMBOL=" " +elif [[ "$GIT_REMOTE" =~ "gitlab" ]]; then + GIT_REMOTE_SYMBOL=" " +elif [[ "$GIT_REMOTE" =~ "bitbucket" ]]; then + GIT_REMOTE_SYMBOL=" " +else + GIT_REMOTE_SYMBOL=" " +fi +echo "$GIT_REMOTE_SYMBOL "