summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtkread14
1 files changed, 10 insertions, 4 deletions
diff --git a/tkread b/tkread
index 49c68b4..d078bcd 100755
--- a/tkread
+++ b/tkread
@@ -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} {