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

From:
Klemens Nanni <kn@openbsd.org>
Subject:
Re: Always list aliases before full command
To:
gameoftrees@openbsd.org
Date:
Mon, 4 Oct 2021 13:11:16 +0000

Download raw body.

Thread
On Mon, Oct 04, 2021 at 02:54:11PM +0200, Stefan Sperling wrote:
> On Mon, Oct 04, 2021 at 12:42:37PM +0000, Klemens Nanni wrote:
> > Sorry for the noise, here's without mangled headers and with a commit
> > message this time...
> >  
> >  Always list aliases before full command
> >  
> >  Break the alphanumerical sort order for cases like `co` and `checkout`
> >  such that searching for tags of aliases (i.e. typing ":tco<Enter>" in
> >  less(1)) jumps to `co` immediately followed by `checkout` which has
> >  all relevant information.
> >  
> >  Otherwise navigating to aliases requires further annoying navigation.
> 
> Would it be worth integrating aliases into the command synopsis, or
> into the text block that describes a command?
> 
> For example:
> 
> diff 136be4cc66ac0ccf41b481e5a22587681c050365 /home/stsp/src/got
> blob - 450e4baab5541257e9c371762a5fe893fa1c19bb
> file + got/got.1
> --- got/got.1
> +++ got/got.1
> @@ -74,6 +74,9 @@ command must be used to populate the empty repository 
>  .Cm got checkout
>  can be used.
>  .It Cm import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
> +Short alias:
> +.Cm im
> +.Pp

This won't produce a tag, i.e. ":tim" will not jump here after your
diff.

We could do the following which preserves tags and is shorter but also
more terse -- not sure of people like it.  I have no preference.


diff c7f2fe0eb66a14c3e6e42d0a92fd34e8c433f3a3 /home/kn/src/got
blob - 450e4baab5541257e9c371762a5fe893fa1c19bb
file + got/got.1
--- got/got.1
+++ got/got.1
@@ -73,7 +73,7 @@ the
 command must be used to populate the empty repository before
 .Cm got checkout
 can be used.
-.It Cm import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
+.It Cm im | import Oo Fl b Ar branch Oc Oo Fl m Ar message Oc Oo Fl r Ar repository-path Oc Oo Fl I Ar pattern Oc Ar directory
 Create an initial commit in a repository from the file hierarchy
 within the specified
 .Ar directory .
@@ -132,9 +132,6 @@ The
 follows the globbing rules documented in
 .Xr glob 7 .
 .El
-.It Cm im
-Short alias for
-.Cm import .
 .It Cm clone Oo Fl a Oc Oo Fl b Ar branch Oc Oo Fl l Oc Oo Fl m Oc Oo Fl q Oc Oo Fl v Oc Oo Fl R Ar reference Oc Ar repository-URL Op Ar directory
 Clone a Git repository at the specified
 .Ar repository-URL