[Bug 1177] '-x command' support for virtual terminal

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Thu Feb 14 20:15:01 CET 2008


http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1177

haakeyar-mailinglists at bluezone.no changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From haakeyar-mailinglists at bluezone.no  2008-02-14 20:15 -------
I just realized that this feature is not properly implemented. When the command 
that is run is terminated, the whole terminal should terminate. If you for 
example have a .desktop entry to open vim, you would want the whole terminal to 
close when you close vim. (Well, at least the tab running vim. If you have 
opened new tabs while vim was running, you would only want the vim-tab to be 
closed.) This is how it is done in for example gnome-terminal.

I might (try to) make a patch, but don't rely on me. I am quite busy with 
school and other things, so I can't guarantee anything.


Comments on the current implementation of -x and -e:

Apparently, you can use static members in instance methods as if they were 
instance members (you can even use this.member_name on static members). 
Actually, they way you modified my -e patch (removed a variable and renamed 
another) would never have worked otherwise. Because of this, there is no need 
to call the setup_command() method with the contents of 
MainWindow.initial_command. Even though setup_command is an instance method, it 
modifies the static initial_command.

Also, I don't think the current implementation of '-x command' is very good: 
* As you said, it removes the option from the --help output.
* Any rest arguments are run in the terminal, even if there is no -x.
* It won't work for commands requiring a command line flag (try for example ./
openmoko-terminal2 -x tail -f filename).
* It won't encode quotes in the commands (try for example ./openmoko-terminal2 -
x echo "This is a quotation mark: \"").
* It won't work with arguments with quotation marks around and spaces inside 
(try for example ./openmoko-terminal2 -x vim "Long filename.txt")
My original -x patch solved all of these problems, but as I said, it is more 
hacky, so you might not want to use it directly.

Reopening and changing the title to keep track of both the -e and the -x 
option. (Feel free to correct me if it is wrong to reopen, I am quite new to 
bug management.)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are on the CC list for the bug, or are watching someone who is.




More information about the buglog mailing list