Misalignment in --help command line

RESOLVED FIXED in mozilla1.9.3a1

Status

()

Toolkit
Startup and Profile System
--
trivial
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: Romain BEZUT, Assigned: Romain BEZUT)

Tracking

Trunk
mozilla1.9.3a1
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

9 years ago
Created attachment 341846 [details] [diff] [review]
patch (with hg up to date)

When I type "myapp --help" or "myapp -h" (works with firefox too), I have something like that :

	-v or -version		Print Firefox version.
	-P <profile>		Start with <profile>.
	-ProfileManager		Start with ProfileManager.
	-no-remote		Open new instance, not a new window in running instance.
	-UILocale <locale>		Start with <locale> resources as UI Locale.
	-safe-mode		Disables extensions and themes for this session.
  -jsconsole           Open the Error console.

There is a misalignment with -jsconsole.

------------------

Patch tested and compiled with the last version of hg (about 15 minutes ago).
Worked successfully on Firefox (did not test with other apps).
Attachment #341846 - Flags: review?(gavin.sharp)
(Assignee)

Comment 1

9 years ago
Created attachment 341862 [details] [diff] [review]
Correction on 2nd alignment

Mmmh, a little mistake that I have not seen before on the 2nd alignment.
Sorry I am a bit tired tonight.
Assignee: nobody → rbezut
Attachment #341846 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #341862 - Flags: review?(gavin.sharp)
Attachment #341846 - Flags: review?(gavin.sharp)

Comment 2

9 years ago
Hmm.
<http://mxr.mozilla.org/comm-central/search?string=helpInfo+%3A&find=&findi=&filter=%5E%5B%5E%5C0%5D*%24&hitlimit=&tree=comm-central>
None of the other javascript based command line handlers use tabs.

Which should the js error console handler be consistent with?

Comment 3

9 years ago
Isn't the display of \t highly dependent on both the OS environment and individual user settings?
(In reply to comment #3)
> Isn't the display of \t highly dependent on both the OS environment and
> individual user settings?

Probably, but IMHO that's why it would be better to display all the options with the same number of tabs or spaces.

The other help messages that are part of the toolkit are displayed with tabs, see:
http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#1174

Comment 5

9 years ago
> Probably, but IMHO that's why it would be better to display all the options
> with the same number of tabs or spaces.

I don't know what you see in comment 0, but none of the lines are aligned on the second column on my browser (not just the error console). Could I suggest that nsAppRunner.cpp be converted to spaces instead?
(Assignee)

Comment 6

9 years ago
(In reply to comment #5)
> I don't know what you see in comment 0, but none of the lines are aligned on
> the second column on my browser (not just the error console). Could I suggest
> that nsAppRunner.cpp be converted to spaces instead?

Bugzilla does not render the correct alignment, all the options are aligned twice, except -jsconsole.

Change all tabulations by spaces in nsAppRunner.cpp can also be a good idea, but I prefer patching a single line in jsconsole-clhandler.js, than multiple lines (and check for alignment with spaces) in nsAppRunner.cpp.

In any case, we should harmonize that stuff.

Comment 7

9 years ago
> but I prefer patching a single line in jsconsole-clhandler.js
....
> In any case, we should harmonize that stuff.

In that case for consistency you should also patch all the other js command line handlers - in both mozilla-central and in comm-central.
Comment on attachment 341862 [details] [diff] [review]
Correction on 2nd alignment

I think it probably makes more sense to convert nsAppRunner - every other component in the tree seems to use spaces.
Attachment #341862 - Flags: review?(gavin.sharp)
(Assignee)

Comment 9

8 years ago
Created attachment 404155 [details] [diff] [review]
Patch V3

This patch applies to Mozilla-Central.
- It fixes the behavior in nsAppRunner (replacing tabulations with spaces).
- And also fixed extra space(s) in -jsconsole, -browser, -private and -setDefaultBrowser.

If a patch for comm-central is needed please tell me.
Works with Hg updated at the time of this comment, tested on Firefox.
Attachment #341862 - Attachment is obsolete: true
Attachment #404155 - Flags: review?(gavin.sharp)
Attachment #404155 - Flags: review?(gavin.sharp) → review+
(Assignee)

Updated

8 years ago
Component: Error Console → Startup and Profile System
Keywords: checkin-needed
QA Contact: error.console → startup
Hardware: x86 → All
Summary: misalignment in --help with jsconsole option → Misalignment in --help command line
http://hg.mozilla.org/mozilla-central/rev/a6a223195bf2
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Blocks: 546296
You need to log in before you can comment on or make changes to this bug.