From 34a998e35634a4a7d2d57c47ecd32dea181be878 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 30 Nov 2017 22:18:41 +0100 Subject: Various changes --- bin/bin/workspace | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3