#!/bin/bash JSON_PATH=~/.shellconfig/workspaces/workspaces.json NAME=${1:-} if [ -z "$NAME" ]; then read -p "🖥 Please give this workspace a name: " NAME fi if [ -z "$NAME" ]; then echo "Error: Invalid workspace name" exit 1 fi # Check if workspace already exists if [ $(cat $JSON_PATH | jq 'keys' | grep "${NAME}") ]; then OVERRIDE=$(cat < ${JSON_PATH} echo "✅ Added ${NAME}"