Re: [PATCH 0/1] Alias 'list'-subcommands to 'ls'
- From
- Daniel Tang <danielzgtg.opensource@gmail.com>
- Date
- Jan 27, 2026, 17:01 UTC
- Message-ID
- <3411428.b9nUPlyArG@daniel-desktop3>
- In-Reply-To
- <xmqqblh7nqmu.fsf@gitster.c.googlers.com>
> Is there a "git somecmd" that allows "git somecmd ls" form, while
`git fast-import` comes close but isn't really it.
> these "git stash list", "git worktree list" subcommands take "list" > and not "ls"? If so, this change may make sense, but otherwise, not > really.
We have a precedent of aliases how `git remote rm` is aliased to `git remote remove`. Speaking of which, I'd also like an alias from `git remote mv` to `git remote rename`.
> 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.
Yes, I run into this once a week. `git-ls-files`, `git-ls-remote`, and `git ls-tree` misleadingly imply that Git commonly writes "list" as "ls". I'm accustomed to `npm ls` being accepted, and even `ip link ls` ignores the extra subcommand. I perceive a command line convention to alias subcommands to coreutils abbreviations e.g. `git rm`/ `docker container rm`/`docker container cp`.