Clustering continous step numbers for better readability
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
VERSION_REV=11
|
VERSION_REV=11
|
||||||
VERSION_MAJOR=0
|
VERSION_MAJOR=0
|
||||||
VERSION_MINOR=3
|
VERSION_MINOR=4
|
||||||
|
|
||||||
## Start of generic script part
|
## Start of generic script part
|
||||||
|
|
||||||
@@ -722,9 +722,13 @@ parseAlias() {
|
|||||||
# [NO TEMPLATE]
|
# [NO TEMPLATE]
|
||||||
# 0 (default) : Ask for template creation
|
# 0 (default) : Ask for template creation
|
||||||
# 1 : Do not ask for template creation
|
# 1 : Do not ask for template creation
|
||||||
# Always display sequencer help and, if available, sequence help
|
# - Always display sequencer help and, if available, sequence help
|
||||||
|
# - Cluster continous (more than 1) steps visually together
|
||||||
displayHelp() {
|
displayHelp() {
|
||||||
local i
|
local i
|
||||||
|
local answer
|
||||||
|
local clusterSize=0
|
||||||
|
local lastClusterSize=0
|
||||||
local createTemplate=1
|
local createTemplate=1
|
||||||
local stepsFound=0
|
local stepsFound=0
|
||||||
CONTEXT_HELP=1
|
CONTEXT_HELP=1
|
||||||
@@ -770,8 +774,17 @@ displayHelp() {
|
|||||||
# Display step reference in help if step function exists
|
# Display step reference in help if step function exists
|
||||||
existsFunction step_${i}
|
existsFunction step_${i}
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
|
if [ $clusterSize -ne 0 ] ; then
|
||||||
|
lastClusterSize=$clusterSize
|
||||||
|
clusterSize=0
|
||||||
|
fi
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
((clusterSize+=1))
|
||||||
|
if [ $lastClusterSize -gt 1 ] ; then
|
||||||
|
lastClusterSize=0
|
||||||
|
echo
|
||||||
|
fi
|
||||||
printf ' Step %3s ' $i
|
printf ' Step %3s ' $i
|
||||||
|
|
||||||
# Display alias if exists
|
# Display alias if exists
|
||||||
|
Reference in New Issue
Block a user