Skip to content

Update commands.md#2966

Merged
dmaluka merged 3 commits intomicro-editor:masterfrom
bound-variable:patch-1
Mar 14, 2024
Merged

Update commands.md#2966
dmaluka merged 3 commits intomicro-editor:masterfrom
bound-variable:patch-1

Conversation

@bound-variable
Copy link
Contributor

removed question marks since they're not meant to be typed and their meaning is equivocal (other options interpretable as interrogative lack them)

removed question marks since they're not meant to be typed and their meaning is equivocal
@dmaluka
Copy link
Collaborator

dmaluka commented Oct 15, 2023

I think these question marks are meant to convey that the parameters are optional.

@bound-variable
Copy link
Contributor Author

bound-variable commented Oct 15, 2023

Right, but other optional parameters lack them. In any case, why not just use standard man notation, i.e., brackets [param] to denote optional parameters? We don't type in question marks here, which will be confusing for new users unfamiliar with such things.

@dmaluka
Copy link
Collaborator

dmaluka commented Oct 15, 2023

Right, but other optional parameters lack them.

Which ones? Might be good to fix them.

In any case, why not just use standard man notation, i.e., brackets [param] to denote optional parameters?

Yeah, I think that's a good idea. The ? notation is alien to me too.

So I'd vote for replacing it with the brackets notation, rather than removing it completely.

@zyedidia
Copy link
Member

They are meant to denote optional parameters (regex notation). Switching to brackets sounds good to me, and fixing any other optional parameters that are not marked properly would also be good.

added brackets around optional arguments, and added 'key' placeholder indicating a required argument for 'showkey'
@bound-variable
Copy link
Contributor Author

bound-variable commented Oct 16, 2023

Done. What about parameters like pl for the plugin commands, and the one I added for showkey: key? Shall we clarify that these are merely placeholders and are meant to be replaced by the user? Man pages use italics for that.

@dmaluka
Copy link
Collaborator

dmaluka commented Oct 16, 2023

Yep, it's an important thing to clarify. Actually there is already the '' notation used for this purpose throughut commands.md, right? So I think we should keep it everywhere, i.e. save ['filename'] instead of save [filename] etc (and showkey 'key' in particular).

@bound-variable
Copy link
Contributor Author

Okay. When I see single quotes in the programming/command line/IT world, I read it as a form of shell escaping, which isn't the same thing as replacing an argument with appropriate text. But yeah, probably no reason to use both italics and single quotes. I'll make the change.

added single quotes inside of bracketed optional params (though I feel they should be reserved for shell escaping, and italics should be used for replacing text of arguments. I also added brackets (and quotes) around the `exec` parameter for `term`, although I'm not really sure if that's right because this command doesn't work on my system.
Copy link
Contributor Author

@bound-variable bound-variable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why github forced me to write this comment when I submitted the PR change

@dmaluka
Copy link
Collaborator

dmaluka commented Oct 17, 2023

Okay. When I see single quotes in the programming/command line/IT world, I read it as a form of shell escaping, which isn't the same thing as replacing an argument with appropriate text. But yeah, probably no reason to use both italics and single quotes. I'll make the change.

Yep, using single quotes in this context doesn't look conventional to me either. But it has the advantage of not depending on the highlighting or on the terminal capabilities (italics don't always work hassle-free in a terminal, actually it seems they more often don't then do), so I don't see a better option right now.

@dmaluka dmaluka merged commit 94af5f1 into micro-editor:master Mar 14, 2024
@bound-variable bound-variable deleted the patch-1 branch August 19, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants