mbox series

[0/1] Alias 'list'-subcommands to 'ls'

Message ID 20201012195335.189194-1-cedricschwyter@bluewin.ch (mailing list archive)
Headers show
Series Alias 'list'-subcommands to 'ls' | expand

Message

Cedric Schwyter Oct. 12, 2020, 7:53 p.m. UTC
Since many CLI-tools make use of this alias and many programmers are
used to it I thought I'd add it to git since I was missing such an alias.

I only added it to built-in subcommands for now, might add it to some
more commands in the future.

Cedric Schwyter (1):
  subcommands: alias 'list'-subcommands to 'ls' where applicable
  docs: update docs with new alias

 Documentation/git-bundle.txt          | 4 ++++
 Documentation/git-sparse-checkout.txt | 3 +++
 Documentation/git-stash.txt           | 5 +++++
 Documentation/git-worktree.txt        | 5 +++++
 builtin/bundle.c                      | 3 ++-
 builtin/sparse-checkout.c             | 3 ++-
 builtin/stash.c                       | 4 +++-
 builtin/worktree.c                    | 3 ++-
 8 files changed, 26 insertions(+), 4 deletions(-)

Comments

Junio C Hamano Oct. 12, 2020, 8:19 p.m. UTC | #1
Cedric Schwyter <cedricschwyter@bluewin.ch> writes:

> Since many CLI-tools make use of this alias and many programmers are
> used to it I thought I'd add it to git since I was missing such an alias.

Is there a "git somecmd" that allows "git somecmd ls" form, while
these "git stash list", "git worktree list" subcommands take "list"
and not "ls"?  If so, this change may make sense, but otherwise, not
really.

>
> I only added it to built-in subcommands for now, might add it to some
> more commands in the future.
>
> Cedric Schwyter (1):
>   subcommands: alias 'list'-subcommands to 'ls' where applicable
>   docs: update docs with new alias
>
>  Documentation/git-bundle.txt          | 4 ++++
>  Documentation/git-sparse-checkout.txt | 3 +++
>  Documentation/git-stash.txt           | 5 +++++
>  Documentation/git-worktree.txt        | 5 +++++
>  builtin/bundle.c                      | 3 ++-
>  builtin/sparse-checkout.c             | 3 ++-
>  builtin/stash.c                       | 4 +++-
>  builtin/worktree.c                    | 3 ++-
>  8 files changed, 26 insertions(+), 4 deletions(-)
Cedric Schwyter Oct. 12, 2020, 8:55 p.m. UTC | #2
As far as I am aware there are only "git ls-files", "git ls-refs", "git 
ls-tree", "git ls-remote" etc.

Yet I think this could be a nice little addition because I always catch 
myself using "ls" out of being used to it from everywhere else really.

On 10/12/20 10:19 PM, Junio C Hamano wrote:
> Cedric Schwyter <cedricschwyter@bluewin.ch> writes:
> 
>> Since many CLI-tools make use of this alias and many programmers are
>> used to it I thought I'd add it to git since I was missing such an alias.
> 
> Is there a "git somecmd" that allows "git somecmd ls" form, while
> these "git stash list", "git worktree list" subcommands take "list"
> and not "ls"?  If so, this change may make sense, but otherwise, not
> really.
> 
>>
>> I only added it to built-in subcommands for now, might add it to some
>> more commands in the future.
>>
>> Cedric Schwyter (1):
>>    subcommands: alias 'list'-subcommands to 'ls' where applicable
>>    docs: update docs with new alias
>>
>>   Documentation/git-bundle.txt          | 4 ++++
>>   Documentation/git-sparse-checkout.txt | 3 +++
>>   Documentation/git-stash.txt           | 5 +++++
>>   Documentation/git-worktree.txt        | 5 +++++
>>   builtin/bundle.c                      | 3 ++-
>>   builtin/sparse-checkout.c             | 3 ++-
>>   builtin/stash.c                       | 4 +++-
>>   builtin/worktree.c                    | 3 ++-
>>   8 files changed, 26 insertions(+), 4 deletions(-)