From fe3b4dd7ee3f388ccffd889e5afb7f3fb02910a3 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sun, 23 Jan 2022 10:52:04 +0200 Subject: [PATCH] workspace manager: when adding same name ask to override --- .../shellconfig/workspaces/add_workspace.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/files/dotfiles/shellconfig/workspaces/add_workspace.sh b/files/dotfiles/shellconfig/workspaces/add_workspace.sh index 72c0e69..ba70098 100755 --- a/files/dotfiles/shellconfig/workspaces/add_workspace.sh +++ b/files/dotfiles/shellconfig/workspaces/add_workspace.sh @@ -14,6 +14,19 @@ if [ -z "$NAME" ]; then exit 1 fi +# Check if workspace already exists +if [ $(cat $JSON_PATH | jq 'keys' | grep "${NAME}") ]; then + OVERRIDE=$(cat <