"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog(1) log by default++
To:
Martin Pieuchot <mpi@openbsd.org>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 14 Feb 2020 16:59:32 +0100

Download raw body.

Thread
On Fri, Feb 14, 2020 at 04:39:48PM +0100, Martin Pieuchot wrote:
> If the second argument on the command line doesn't match a command name
> let the tool to assume it's a path.  In other words the following:
> 
> 	$ tog kern/kern_sync.c
> 
> Becomes an alias for:
> 	
> 	$ tog log kern/kern_sync.c
> 
> This is similar to what tig(1) does and it helps me being lazy :o)

This behaviour already existed once and was reverted in
commit 3642c4c6513e3536dc77e8f2b7a2402d1aa916a7

I don't recall why I reverted it. I suspect it was to keep the
'command subcommand' syntax consistent across both got(1) and tog(1).
And I didn't like the old implementation I had, but yours looks cleaner.

If you really want it, fine. But please also update the documentation.

> While here remove make_argv(), or is the  need to fake a command name
> necessary instead of just rewinding ``argv''?

I like this change.