summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2017-11-30 22:18:41 +0100
committerUrbain Vaes <urbain@vaes.uk>2017-11-30 22:18:41 +0100
commit34a998e35634a4a7d2d57c47ecd32dea181be878 (patch)
treeacd9967af03d8537df0051daf17ebee720af0d61 /bin
parentb8e547dec5d0f388d4dfd8c1c97d389a3b045d59 (diff)
Various changes
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