Clear console command

Project:JNode Core
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Clear console command + cls and clear alias

AttachmentSize
issues_1162.98 KB

try pressing ctrl + l

try pressing ctrl + l

You are correct but ...

... a 'clear' command could be useful for scripting.

I don't like the idea of defining two aliases for the command though. IMO, that sort of thing should be set up in shell initialization scrits; c.f. ".profile", ".login" and so on for UNIX shells.

Hmm... I once looked at it

Hmm... I once looked at it some years ago and found the functionality, at that moment, not so easy to extract to a command. I could maybe take an other look. The aliases part can come later when I get there.

Martin

There's a patch

Bluebit added a patch. I didn't commit it because it neither uses the Command interface nor the new syntax. I'm not sure if that's a problem, so I waited for Stephen Smiling

Commit it ...

... and I will convert it later. It should work fine in its current state. (It won't show any command help, and may do bogus completion, but those are harmless cosmetic issues.)

The command shell, etc are designed to work with commands that only have a 'public static void main(String[])' entry point, with no old or new style JNode syntax hooks. Running non-JNode Java applications correctly is a core functional requirement of the command shell.

This reminds me: I need to write some Book pages on how to write commands and syntaxes, and how the command shell / invokers launch commands.

#1

Status:active» closed

I've committed your new "clear" command. Thanks for writing it.

(I didn't commit the "cls" alias though, and I fixed the indentation, and an incorrect command name in the Help.Info descriptor.)

I'll do the old-to-new syntax conversion when I get to it in my pass through the codebase. Marking this issue as closed.