Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One dash for short aliases #1781

Closed
arbitrary-dev opened this issue Oct 14, 2020 · 2 comments
Closed

One dash for short aliases #1781

arbitrary-dev opened this issue Oct 14, 2020 · 2 comments
Labels

Comments

@arbitrary-dev
Copy link

Description

Please use 1 dash for short aliases.

Setup

.option(
  'exclude',
  {
    desc: 'A list of text files to exclude from encryption',
    alias: 'e',
    array: true,
    type: 'string',
  },
)
.option(
  'exclude-extension',
  {
    desc: 'An extension to exclude from encryption list',
    alias: 'ee',
    type: 'string',
  },
)

Current output

  -e, --exclude                  A list of text files to exclude from encryption
                                                                         [array]
      --exclude-extension, --ee  An extension to exclude from encryption list
                                                                        [string]

Expected output

  -e, --exclude            A list of text files to exclude from encryption
                                                                         [array]
 -ee, --exclude-extension  An extension to exclude from encryption list
                                                                        [string]
@bcoe bcoe added the question label Oct 14, 2020
@bcoe
Copy link
Member

bcoe commented Oct 14, 2020

The single dash is used specifically for single character aliases, I don't think we should encourage people to use a single dash except for this case, as it has special meaning:

rm -rf

☝️ this is setting both the -r and -f option, not a single option called -rf.

@arbitrary-dev
Copy link
Author

Ah, I see…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants