summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bin/workspace4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/bin/workspace b/bin/bin/workspace
index 51c488a..3bf9ea9 100755
--- a/bin/bin/workspace
+++ b/bin/bin/workspace
@@ -20,8 +20,8 @@ act_on_container() {
# If new workspace has to be created
if [[ ! $target = [0-9]* ]]; then
- # Add number to workspace name
- new_number=$(echo "$workspaces" | awk '$1!=p+1{exit;}{p=$1} END {print p+1}')
+ # Add number to workspace name (start at 1, but allow 0)
+ new_number=$(echo "$workspaces" | awk '$1!=p+1 && $1!=0 {exit;}{p=$1} END {print p+1}')
target=$new_number:$target
fi