Re: [dev] Re: [dev] [dev] Usage , -h, --help, help, synopsis, …

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 08:07:05PM +0200, Alexander Teinum wrote: > > I think the best format for usage is something like what Plan 9 > > utilities use (BSD use the same): > > > > usage: cmd [-abcde] [-f file] [-g pattern] [file ...] > > Options without values are combined? Is that correct? Yes.

Re: [dev] Re: [dev] Usage, -h, - -help, help, synopsis, …

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 07:35:15PM +0100, Connor Lane Smith wrote: > Hey, > > > Options without values are combined? Is that correct? > > Can be. Though, many suckless projects don't accept this and use, eg, > strcmp(argv[i], "-sb"). A number of non-suckless programs are similar. Most default X1

Re: [dev] Re: [dev] Re: [dev] Us age, -h, --help, help, synopsis, …

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 09:36:14PM +0200, Alexander Teinum wrote: > It would be a nice challenge to write a really small getopt() > replacement, and a program that generates usage text. Check getflags(8)[1], it parse options and generate usage messages for rc scripts. For C there are ARGBEGIN, AR

Re: [dev] [surf] URI handling, with patch

2010-08-18 Thread anonymous
On Tue, Aug 17, 2010 at 06:52:40PM -0400, Ryan Mullen wrote: > Second, dmenu's "suggested" integration with surf is a bit dodgy. If, > for example, a user is viewing surf.suckless.org and they wish to > navigate to suckless.org, they would be required to strike > shift+return in order to actually v

Re: [dev] [dev] Usage, -h, --hel p, help, synopsis, …

2010-08-18 Thread Claudio M. Alessi
On Tue, Aug 17, 2010 at 08:52:37PM +0400, anonymous wrote: > usage: cmd [-abcde] [-f file] [-g pattern] [file ...] What about cmd [-abcde] [-fg arg] [file ...]? > usage: flo [-c id] [-f from] [-r id] [-t to] [-w what] [what[,from][-to]] With the above rules this should be: flo [-cfrtw arg] [what[,

Re: [dev] flo - a command line program for organizing events, to-dos, and deadlines

2010-08-18 Thread Dieter Plaetinck
On Wed, 18 Aug 2010 01:27:22 +0200 Alexander Teinum wrote: > How many of these small tools are there? moreutils rock. they really fill some gaps. niche, but still. Dieter

[dev] Re: [dev] Man coloring. [was: Usage, -h, --help, hel p, synopsis, …]

2010-08-18 Thread Lorenzo Bolla
On Wed, Aug 18, 2010 at 7:27 AM, Antoni Grzymala wrote: > Suraj Kurapati dixit (2010-08-17, 20:49): > > > > As for bold, fortunately my terminal has it disabled, > > > > I set up nice colors for bold and underline so things are easy to read > > (see the attached screenshot). If anyone is interest

[dev] Re: [dev] [dev] Usage, -h, --help, help, synopsis, …

2010-08-18 Thread Alexander Teinum
But we don’t need the brackets. As long as the usage text is unambiguous, then they don’t add any information. Am I right? Alexander

[dev] [wmii] colrules percentages?

2010-08-18 Thread Nikhilesh S
How do the colrules percentages work? Does each number represent the percentage of column n as a fraction of the width of the whole screen, or of the last selected column before it was created, or ... ? I ask because I was messing with colrules for GIMP for a while but I wasn't able to get it wor

[dev] Re: [dev] Re: [dev] [dev] Usage, -h, --help, help, s ynopsis, …

2010-08-18 Thread Connor Lane Smith
On 18 August 2010 15:37, Alexander Teinum wrote: > But we don’t need the brackets. As long as the usage text is > unambiguous, then they don’t add any information. Am I right? Two instances which make this untrue: > ar [-]key archive [files...] > eg [-b from to] files... It also just makes the

[dev] Re: [dev] Re: [dev] Re: [dev] [dev] Usage, -h, --hel p, help, synopsis, …

2010-08-18 Thread Alexander Teinum
(Sorry for not quoting names. It’s cumbersome to do with more than one person in Gmail.) > With the above rules this should be: flo [-cfrtw arg] [what[,from][-to]] I think that’s too little information. > It also just makes the usage easier to read, in my opinion. Dropping a > few characters jus

Re: [dev] [surf] URI handling, with patch

2010-08-18 Thread Gene Auyeung
I've been using a patched version of dmenu since I started using surf. It sort of emulates firefox's address bar, (but I haven't been using firefox in a while so I'm not too sure..): 1) The Tab key acts as the Down key and Shift+Tab acts as Up. 2) Before Tab/Down/Shift+Tab/Up keys are pressed, no

[dev] Re: [dev] Re: [dev] [dev] Usage, -h, --help, help, s ynopsis, …

2010-08-18 Thread Anh Hai Trinh
On Wed, Aug 18, 2010 at 10:27 AM, Kris Maglione wrote: > > GNU man has the annoying and difficult to stop habit of filling the entire > width of the terminal rather than wrapping at 80 chars. And if you set > $MANWIDTH or $COLUMNS to 80 and the terminal isn't that wide, you wind up > with badly br

[dev] Re: [dev] Re: [dev] Re: [dev] Re: [dev] [dev] Usage, -h, --help, help, synopsis, …

2010-08-18 Thread Connor Lane Smith
2010/8/18 Alexander Teinum : > I’d like to write a KISS option parser that accepts “program -c -a -f > some_file”, but not “program -ca -fsome_file”. I prefer to keep the > rules simple. Such a simple option set probably doesn't actually *need* a parser. I don't think any lines would be freed up i

Re: [dev] Re: [dev] Re: [dev] Re : [dev] [dev] Usage, -h, --help, help, synops is, …

2010-08-18 Thread anonymous
On Wed, Aug 18, 2010 at 05:55:10PM +0200, Alexander Teinum wrote: > Is it okay to use three dots in the usage text? (See echo’s man page.) > I think it means that you can repeat what’s before the three dots. It is ok and they should be used. And it should be 3 dots, not … so usage is in ASCII. A

Re: [dev] [surf] URI handling, with patch

2010-08-18 Thread Alex Puterbaugh
>On Tue, Aug 17, 2010 at 06:52:40PM -0400, Ryan Mullen wrote: > > The first problem is a simple patch, but I'm not sure what is the best > approach here. As far as I can see, I think it would be best to assume > that URIs without "://" in them are actually file:// types, and > http:// should be re

[dev] Re: [dev] Re: [dev] Man coloring. [was: Usage, -h, - -help, help, synopsis, …]

2010-08-18 Thread Suraj Kurapati
On Wed, Aug 18, 2010 at 7:09 AM, Lorenzo Bolla wrote: > On Wed, Aug 18, 2010 at 7:27 AM, Antoni Grzymala wrote: >> Suraj Kurapati dixit (2010-08-17, 20:49): >> > http://github.com/sunaku/home/blob/master/.Xdefaults >> >> Any hints how to enable coloring in X terminals? > > I believe the options t

Re: [dev] Re: [dev] Man coloring . [was: Usage, -h, --help, help, synopsis, …]

2010-08-18 Thread Antoni Grzymala
Lorenzo Bolla dixit (2010-08-18, 15:09): > > > > As for bold, fortunately my terminal has it disabled, > > > > > > I set up nice colors for bold and underline so things are easy to read > > > (see the attached screenshot). If anyone is interested, my Xdefaults > > > file is here: > > > > > > ht

Re: [dev] Re: [dev] Re: [dev] Re : [dev] [dev] Usage, -h, --help, help, synops is, …

2010-08-18 Thread Jacob Todd
On Wed, Aug 18, 2010 at 05:55:10PM +0200, Alexander Teinum wrote: > I’d like to write a KISS option parser that accepts “program -c -a -f > some_file”, but not “program -ca -fsome_file”. I prefer to keep the > rules simple. take a look at the ARGBEGIN and ARGEND macro's in Plan 9. pgpoEUvuWrFez.p