diff options
author | Nick White <git@njw.me.uk> | 2014-01-30 17:27:37 +0000 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2014-01-30 17:27:37 +0000 |
commit | 170cc4b91cf6f7d6266363bd73ec55a3db9b60ff (patch) | |
tree | fc0358be0f27be7900c5ee1793c7d3bba29a0f17 | |
parent | c4f4d63fbec5dbb026e9ccebbc89e498f3c42e1c (diff) | |
download | tkread-170cc4b91cf6f7d6266363bd73ec55a3db9b60ff.tar.bz2 tkread-170cc4b91cf6f7d6266363bd73ec55a3db9b60ff.zip |
Add usage printing
-rwxr-xr-x | tkread | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,9 +1,10 @@ #!/usr/bin/tclsh # See COPYING file for copyright and license details. -# Usage: tkread [-w] [-m] -# -w rewrap lines -# -m format markdown text -# + +set usage {tkread [-w] [-m] + -w rewrap lines + -m format markdown text} + # The markdown parsing is inspired by the code of smu: # <https://github.com/Gottox/smu> # @@ -38,6 +39,11 @@ set surroundfmt { \ {"=" "6" ""} \ } +if { $::argc > 0 && [lindex $::argv 0] == "-h" } { + puts "Usage: $usage" + exit +} + package require Tk proc rewrap {text} { |