docker / docker/cli

-h should be exempt from "shorthand has been deprecated" warning

Open
#3,249 9 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/ux
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

I was trying to learn docker build's options today, so I put docker build -h into my shell and got the following message (and then the help output).

Flag shorthand -h has been deprecated, please use --help

For most flags, this seems reasonable, but I typed -h because I don't know what Docker's argument conventions are. The help output even lists a number of short flags that are presumably still valid (-f file, -o destination, -q, -t tag). -h should be one of them, possibly even with an extra special case for -help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the docker build -h entry point to where the shorthand-deprecation warning is produced. Verify the expected behavior against the existing help output and tests, then confirm that -h displays help without the deprecation warning while other deprecated shorthands retain their warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.