diff options
author | Urbain Vaes <urbain@vaes.uk> | 2017-11-30 22:18:41 +0100 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2017-11-30 22:18:41 +0100 |
commit | 34a998e35634a4a7d2d57c47ecd32dea181be878 (patch) | |
tree | acd9967af03d8537df0051daf17ebee720af0d61 /bin | |
parent | b8e547dec5d0f388d4dfd8c1c97d389a3b045d59 (diff) |
Various changes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bin/workspace | 4 |
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 |