From 170cc4b91cf6f7d6266363bd73ec55a3db9b60ff Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 30 Jan 2014 17:27:37 +0000 Subject: Add usage printing --- tkread | 14 ++++++++++---- 1 file 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: # # @@ -38,6 +39,11 @@ set surroundfmt { \ {"=" "6" ""} \ } +if { $::argc > 0 && [lindex $::argv 0] == "-h" } { + puts "Usage: $usage" + exit +} + package require Tk proc rewrap {text} { -- cgit v1.2.3