Skip to content

Command Line Switches: Addition of short switches for their long counterparts #11644

Description

@elliott94

Is your feature request related to a problem? Please describe.

NVDA offers several command line switches that can be used. Some of these switches offer both short and long versions - could we possibly consider adding short versions of the following? This would have the potential to speed up the workflows of power users/system admins when manually typing out these switches at regular intervals:

--disable-addons - consider adding a "-noaddons" switch to perform this task

--debug-logging - consider adding a "-debuglog" switch to perform this task

--no-logging - consider adding a "-nolog" switch to perform this task

--no-sr-flag - consider adding a "-noflag" switch to perform this task

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Activity

XLTechie commented on Sep 22, 2020

@XLTechie
Collaborator

elliott94 commented on Sep 22, 2020

@elliott94
Author

Makes perfect and logical sense - thank you too for adding info about these standards. :) So how about:

--disable-addons - consider adding a "-d" switch to perform this task

--debug-logging - consider adding a "-D" switch to perform this task

--no-logging - consider adding an "-n" switch to perform this task

--no-sr-flag - consider adding an "-N" switch to perform this task

Depending on feedback, happy to edit the initial description with these alternative switches.

XLTechie commented on Sep 22, 2020

@XLTechie
Collaborator

First, NVDA does in fact support option combining as I mentioned it might (-Dd), according to user guide section 16.1.

Second, I'm not really clear on the value of the --no-logging option. That should be doable with "-l 0" or "-l 255" or something, even if it isn't now. So I'm not sure I support a short option for that, since I don't see the need for having the switch at all.

Third, I think the --portable-path=PORTABLEPATH switch should go away, and the portable creation options should require a pathspec.

Lastly, here is my list of suggestions for short options, incorporating those of yours with which I agree:

SHORT LONG
-d --disable-addons
-D --debug-logging
-R --no-sr-flag
-i --install
-I --install-silent
-E --enable-start-on-logon
-p --create-portable
-P --create-portable-silent

Note regarding -E: it is an uncommon option, so I capitalized it. Rather keep the lowercase for something more valuable.

@feerrenrut @josephsl : thoughts on the reasonableness of any of this?
I come from a Linux background, so it feels wrong to me if there aren't short switches for the vast majority of the CLI options.

feerrenrut commented on Oct 9, 2020

@feerrenrut
Contributor

I would prefer only adding short switches for commonly typed options. Adding short form for all options doesn't seem to solves any specific issue. Short form is useful for regularly typed options. If an admin is configuring a script or shortcut, it would be more sensible to use the long form since it is self documenting the intent.

Adriani90 commented on Nov 21, 2024

@Adriani90
Collaborator

cc: @gerald-hartig for triaging.

CyrilleB79 commented on Nov 21, 2024

@CyrilleB79
Contributor

I have the same opinion as Reef (see #11644 (comment)), i.e. only adding short switches for commonly typed options.

Personally, I commonly type: --disable-addons, --debug-logging and --lang. If --lang is finally not selected in the short option subset, that's not a big problem because "--lang en" is not much longer than "-G en".

gerald-hartig commented on Nov 27, 2024

@gerald-hartig
Contributor

Closing as per Reef's comment.

CyrilleB79 commented on Nov 27, 2024

@CyrilleB79
Contributor

I agree not to define a short switch for any option, especially for those only used in sysadmin install scripts.

Though, there are still commonly used options without a short switch:

  • --lang
  • --disable-addons
  • --debug-logging

The actual question is: how do you define "commonly used"? Basic NVDA usage does not need to use command line. Thus the two most common usages IMO are:

  1. A user has issues with NVDA and is instructed by someone else to launch NVDA with specific options. Providing a command line is much more synthetic than instructing to set or unset option X or Y.
  2. An NVDA or add-on tester wants to test NVDA with settings that he does not usually uses, e.g. change language, disable add-ons, etc.

Thus, here is my proposal to introduce 3 other short switches:

  • -d for --disable-addons
  • -g for --debug-logging
  • -L for --lang, or -n if we don't want or can't use case sensitive switches

All other switches are meant to be used in scripts IMO.

@gerald-hartig or @seanbudd would you accept a PR implementing this proposal?

seanbudd commented on Nov 28, 2024

@seanbudd
Member

I think switches for lang and disabling add-ons makes sense.

Wouldn't using the log short switch l -10 be sufficient for debug logging?

CyrilleB79 commented on Nov 28, 2024

@CyrilleB79
Contributor

Wouldn't using the log short switch l -10 be sufficient for debug logging?

Well, if I want to provide a debug log to debug an add-on, typing "nvda -gn en" is shorter than "nvda -l 10 -n en".

Reopening to implement only the 2 or 3 most common switches.

self-assigned this
on Nov 28, 2024

seanbudd commented on Dec 2, 2024

@seanbudd
Member

@CyrilleB79 - the debug logging switch is redundant and longer than the alternatives. --log-level 10 and -l 10 are both shorter. I think we would drop it if it wouldn't be a breaking change. I don't think we should be adding (minor) complexity to it.
For short switches we plan to only accept:

-n or -g for --lang and -d for --disable-addons.

added
p5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
triagedHas been triaged, issue is waiting for implementation.
on Dec 2, 2024
added a commit that references this issue on Dec 13, 2024
db6458a
added this to the 2025.1 milestone on Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions