diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2013-01-08 12:07:57 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2013-01-08 12:07:57 +0000 |
commit | 19e946c37c62e6bb2dc6ec0b44588fcf7c01f72a (patch) | |
tree | 0729ee21d9f4a672307802f11e38fea801403a3b | |
parent | 52132159e28fefec43c523108c1884de84f0247d (diff) | |
download | slop-19e946c37c62e6bb2dc6ec0b44588fcf7c01f72a.tar.gz |
add [command] to banner if commands exist
-rw-r--r-- | lib/slop.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/slop.rb b/lib/slop.rb index 2c56df5..82c1bc4 100644 --- a/lib/slop.rb +++ b/lib/slop.rb @@ -431,7 +431,7 @@ class Slop end banner = config[:banner] - banner = "Usage: #{File.basename($0, '.*')} [options]" if banner.nil? + banner = "Usage: #{File.basename($0, '.*')}#{' [command]' if @commands.any?} [options]" if banner.nil? if banner "#{banner}\n#{@separators[0] ? "#{@separators[0]}\n" : ''}#{optstr}" else |