Bug 726446 - RFE: CLI: Add `batch` to interactive mode.
Summary: RFE: CLI: Add `batch` to interactive mode.
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 3.0.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-28 16:02 UTC by Ondřej Žižka
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Ondřej Žižka 2011-07-28 16:02:55 UTC
In AS 7 CLI (interactive mode), you can type `batch` and write few commands, which are done in batch after you type `run-batch`.

Would be nice to have this in RHQ CLI, too.
(I'm not asking for other functionality like AS 7 CLI's rollback.)

It would people allow to copy and paste multiline constructs like

   for( var i = ... ){
       ...
   }

without need to append \ to the end of the line.

Thanks for considering.

Comment 1 Ondřej Žižka 2011-08-01 23:24:45 UTC
Workaround:

Just found a trick for CLI.

If you want to have a script but still want to be able to copy it to interactive CLI before https://bugzilla.redhat.com/show_bug.cgi?id=726446 is implemented (if ever :),
then you can do this:

try { // \
   ...  // No need for \ inside a block
} // \
catch { // \
   ...
}

And because you don't need \ inside the root block, you can simply do

{ // \
   // whatever ...
}

So you can e.g. copy'n'paste whole function bodies, while only cluttering it's first line.


HTH,
Ondra


Note You need to log in before you can comment on or make changes to this bug.