Bug 162402 - Need DCOP function to check whether konsole has some command typed in
Summary: Need DCOP function to check whether konsole has some command typed in
Status: RESOLVED INTENTIONAL
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.6.6
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 14:29 UTC by Sasha Unspecified
Modified: 2008-05-23 22:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sasha Unspecified 2008-05-21 14:29:31 UTC
Version:           1.6.6 (using 3.5.9, Kubuntu (hardy) 4:3.5.9-0ubuntu7.1)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.24-16-generic

I want the following DCOP function for every session (when "--script" option used):
bool hasCommandTypedIn().

For example:
"user@host:~$ " -- returns false
"user@host:~$ sed 's/^.+/(" -- returns true


Why do I need this?
Krusader sends "cd DIR" to Konsole each time panel is changed (that's useful). But when Konsole already has a command typed in, this leads to execution of malformed command: e.g. "sed 's/^.+/( cd /etc/httpd". If hasCommandTypedIn() function were available, then Krusader would be able to check whether something is typed in Konsole, and send "cd DIR" only if nothing is already typed.


Or, another possible solution:
to provide a DCOP function to change current directory of some session.
Comment 1 Sasha Unspecified 2008-05-22 12:44:53 UTC
Actually "to provide a DCOP function to change current directory of session" is even better -- if it is possible, of course.

Anyway, thanks (for Konsole, and for reading the wishes).
Comment 2 Robert Knight 2008-05-23 22:34:06 UTC
> But when Konsole already has a command typed in

Konsole does not 'understand' in any sense the content that is displayed in the terminal.  That is, it does not know whether there is a command currently entered in the shell or not.  It does not even know whether the program running is a shell or something else.

Unfortunately I think you will have to find a different solution to your problem.