Petals ESB CLI

Usage of the stdin redirection must be cleared

Details

  • Type: Improvement Request Improvement Request
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.0
  • Fix Version/s: 2.0.0
  • Component/s: Command-line
  • Security Level: Public
  • Description:
    Hide

    Petals CLI can process command using several ways:

    • one command defined as argument on the command line,
    • several commands entered using the mode 'console',
    • several commands entered using the stdin that can be redirected (using the option '-s')

    Petals CLI can't process a file of commands directly.

    It should be more usable to have:

    • an option to execute the command on command line, as the system tool 'su': petals-cli.sh -c <command>
    • by default, the mode 'console' is displayed: petals-cli.sh
    • the file of commands to execute is set as argument on command line: petals-cli.sh <my-command-file>
    • to use the stdin as stream of commands, use the 'special' filename '-', that is the standard way (see the system tool 'tar'): petals-cli.sh - < my-file

    So the stding redirection will be clearer (see PETALSESBCLI-9)

    Show
    Petals CLI can process command using several ways:
    • one command defined as argument on the command line,
    • several commands entered using the mode 'console',
    • several commands entered using the stdin that can be redirected (using the option '-s')
    Petals CLI can't process a file of commands directly. It should be more usable to have:
    • an option to execute the command on command line, as the system tool 'su': petals-cli.sh -c <command>
    • by default, the mode 'console' is displayed: petals-cli.sh
    • the file of commands to execute is set as argument on command line: petals-cli.sh <my-command-file>
    • to use the stdin as stream of commands, use the 'special' filename '-', that is the standard way (see the system tool 'tar'): petals-cli.sh - < my-file
    So the stding redirection will be clearer (see PETALSESBCLI-9)
  • Environment:
    -

Issue Links

Activity

Hide
Christophe DENEUX added a comment - Thu, 1 Mar 2012 - 14:53:05 +0100

To prevent to mix the mode 'console' with a stdin redirection, it is better to have:

  • by default, a file is expected to be executed,
  • a new option '-C' enables the mode 'console'
  • the mode 'console' is provided by a new script 'petals-console.sh' that invokes 'petals-cli.sh -C''. On linux it should be more standard to use a symlink, but I'm not sure that is possible to keep it in the final zip file.
Show
Christophe DENEUX added a comment - Thu, 1 Mar 2012 - 14:53:05 +0100 To prevent to mix the mode 'console' with a stdin redirection, it is better to have:
  • by default, a file is expected to be executed,
  • a new option '-C' enables the mode 'console'
  • the mode 'console' is provided by a new script 'petals-console.sh' that invokes 'petals-cli.sh -C''. On linux it should be more standard to use a symlink, but I'm not sure that is possible to keep it in the final zip file.
Hide
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 16:29:31 +0100

Wrapper script for the mode 'console' is not include in the commit svn#31533

Show
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 16:29:31 +0100 Wrapper script for the mode 'console' is not include in the commit svn#31533
Hide
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 16:29:52 +0100

Re-open to add the wrapper script

Show
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 16:29:52 +0100 Re-open to add the wrapper script
Hide
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 17:04:29 +0100

As it is not more usable than the option '-C' on command line, the wrapper script is removed

Show
Christophe DENEUX added a comment - Mon, 5 Mar 2012 - 17:04:29 +0100 As it is not more usable than the option '-C' on command line, the wrapper script is removed

People

Dates

  • Created:
    Wed, 29 Feb 2012 - 18:22:54 +0100
    Updated:
    Thu, 20 Sep 2012 - 16:56:47 +0200
    Resolved:
    Mon, 5 Mar 2012 - 17:04:29 +0100