--execute changes following -h to --help

Bug #1663737 reported by Gary Filipski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description: Ubuntu 16.04.1 LTS
Release: 16.04

gnome-terminal:
  Installed: 3.18.3-1ubuntu1
  Candidate: 3.18.3-1ubuntu1
  Version table:
 *** 3.18.3-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Create a bash script called echoParams.sh somewhere in your current path (attached):

    #!/bin/bash
    for param in "$@"
    do echo "param '$param'"
    done
    echo -n "Enter to finish..."
    read junk

Execute the following:

    $ gnome-terminal --execute echoParams.sh -h

In a new terminal window the output is:

    param '--help'
    Enter to finish...

... meanwhile, back at the command line:

    $ which gnome-terminal
    /usr/bin/gnome-terminal

    $ gnome-terminal --version
    GNOME Terminal 3.18.3

The '-h' is being translated and passed as '--help'

... which is no help at all if the --execute command expects '-h'.

All puns intended.

Revision history for this message
Gary Filipski (gfilipski) wrote :
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Newest gnome-terminal declares the --execute/--command options obsolete, and states that a lone "--" followed by the arguments is the desired way to go. That one doesn't suffer for me in newest gnome-terminal (git snapshot). Could you please try this with your version, that is:

gnome-terminal -- echoParams.sh -h

Revision history for this message
Gary Filipski (gfilipski) wrote : Re: [Bug 1663737] Re: --execute changes following -h to --help
Download full text (4.2 KiB)

Egmont,

The man page for the version that I have does not mention '--' nor the fact
that the --execute
option is obsolete --- BUT! ... the '--' option *does* work and functions
as desired with
the command-line you gave below... the '-h' is echoed properly.

Thank you for taking the time to look into this.

The man page probably needs to be updated as even the 'Zesty' version still
shows the
--command and --execute options (and no '--') with the same description as
16.04 LTS.

Thanks,
Gary

PS: I've added this text as a comment to bug report.

On Sun, Feb 12, 2017 at 7:12 AM, Egmont Koblinger <email address hidden> wrote:

> Newest gnome-terminal declares the --execute/--command options obsolete,
> and states that a lone "--" followed by the arguments is the desired way
> to go. That one doesn't suffer for me in newest gnome-terminal (git
> snapshot). Could you please try this with your version, that is:
>
> gnome-terminal -- echoParams.sh -h
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1663737
>
> Title:
> --execute changes following -h to --help
>
> Status in gnome-terminal package in Ubuntu:
> New
>
> Bug description:
> Description: Ubuntu 16.04.1 LTS
> Release: 16.04
>
> gnome-terminal:
> Installed: 3.18.3-1ubuntu1
> Candidate: 3.18.3-1ubuntu1
> Version table:
> *** 3.18.3-1ubuntu1 500
> 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64
> Packages
> 100 /var/lib/dpkg/status
>
> Create a bash script called echoParams.sh somewhere in your current
> path (attached):
>
> #!/bin/bash
> for param in "$@"
> do echo "param '$param'"
> done
> echo -n "Enter to finish..."
> read junk
>
> Execute the following:
>
> $ gnome-terminal --execute echoParams.sh -h
>
> In a new terminal window the output is:
>
> param '--help'
> Enter to finish...
>
> ... meanwhile, back at the command line:
>
> $ which gnome-terminal
> /usr/bin/gnome-terminal
>
> $ gnome-terminal --version
> GNOME Terminal 3.18.3
>
>
> The '-h' is being translated and passed as '--help'
>
> ... which is no help at all if the --execute command expects '-h'.
>
> All puns intended.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bu
> g/1663737/+subscriptions
>

On Sun, Feb 12, 2017 at 7:12 AM, Egmont Koblinger <email address hidden> wrote:

> Newest gnome-terminal declares the --execute/--command options obsolete,
> and states that a lone "--" followed by the arguments is the desired way
> to go. That one doesn't suffer for me in newest gnome-terminal (git
> snapshot). Could you please try this with your version, that is:
>
> gnome-terminal -- echoParams.sh -h
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1663737
>
> Title:
> --execute changes following -h to --help
>
> Status in gnome-terminal package in Ubuntu:
> New
>
> Bug description:
> Description: Ubuntu 16.04.1 LTS
> Release: 16.04
>
> gnome-terminal:...

Read more...

Revision history for this message
Gary Filipski (gfilipski) wrote :

The man page for the version that I have does not mention '--' nor the fact that the --execute
option is obsolete --- BUT! ... the '--' option *does* work and functions as desired with
the command-line you gave... the '-h' is echoed properly.

Thank you for taking the time to look into this.

The man page probably needs to be updated as even the 'Zesty' version still shows the
--command and --execute options (and no '--') with the same description as 16.04 LTS.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Official gnome-terminal release does not have a manpage, it's added by Debian or Ubuntu (not sure which), indeed they should fix it.

"gnome-terminal --help-all" should be clear and up to date in gnome-terminal's git master, probably not yet in zesty but will appear in whichever release comes after that (17.10).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.