Change to the [cmd] tag on these forums

Status
Not open for further replies.

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer
As regular posters may know, the [cmd] tag is quite tricky to use. Until now, when using the
cmd.gif
button on a selected block of text, you were prompted for a 'parameter', which was either % or $ for a user command, # for a root command, or a space or "" if the distinction did not matter.

However, simply pressing [enter] in that box resulted in something that literally looked like "[cmd]ls -al[/cmd]", which means it had to be edited by hand into something like [cmd=""]ls -al[/cmd], to make it look like the desired [cmd=]ls -al[/cmd].

To mitigate this issue, the [cmd] tag can now be used like this: [cmd]ls -al[/cmd] which will simply show ls -al. Moreover, the
cmd.gif
button in the edit box will now also work with the 'straight' [cmd] tag, so it will no longer prompt for a parameter.

If you really need to emphasize that a command needs to be run as a certain user, just make the user prompt (e.g. $ or % or #) part of the command itself. For example, [cmd]# ls -al[/cmd], which will look like # ls -al.

To maintain backward compatibility, the old-style [cmd] tags, which contained the user prompts within the tag (e.g. [cmd=$]) will continue to work.

The current options, in short:
  • [cmd]ls -al[/cmd] gives: ls -al
  • [cmd]$ ls -al[/cmd] gives: $ ls -al
  • [cmd]% ls -al[/cmd] gives: % ls -al
  • [cmd]# ls -al[/cmd] gives: # ls -al
  • [cmd=]ls -al[/cmd] gives: [cmd=]ls -al[/cmd]
  • [cmd=""]ls -al[/cmd] gives: [cmd=""]ls -al[/cmd]
  • [cmd=$]ls -al[/cmd] gives: $ ls -al
  • [cmd=%]ls -al[/cmd] gives: % ls -al
  • [cmd=#]ls -al[/cmd] gives: # ls -al

For all intents and purposes, simply selecting a block of text and clicking the
cmd.gif
button will give the desired outcome in almost every case. I hope this change adds to the usability of these forums.
 
Status
Not open for further replies.
Back
Top