Commit ed9c9259 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Simplified the help messages

Compacted summaries, help messages & help formatting into a single
subcommand argument handler, rather than the former two split between
two handlers and the later in a different file altogether.
parent 98d40f0a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -225,14 +225,11 @@ parse_args ()
		fi
		case "$1" in
			--help|-h)
				echo "$command: $summary"
				printf "$BIN $command"
				summarise_args | wrap "    "
				return 1
				;;
			--summary)
				echo "$summary"
				return 1
				;;
			--) # everything subsequent is positional options
				opts_only=yes
				;;
+2 −4
Original line number Diff line number Diff line
@@ -42,13 +42,11 @@ full_usage ()
{
	usage
	echo "Sub-commands:"
	echo "-------------"
	for command in "${commands[@]}"; do
		echo "-------------"
		echo
		echo -n "$command: "
		eval cmd_$command $command --summary || true
		eval cmd_$command $command --help || true
		echo "-------------"
		echo
		free_args
	done
}