[Konsole-devel] [Bug 179039] New: GUI for BASH (possibly other shells as well) autocompletion feature

Roman Standzikowski romanujan at gmail.com
Mon Dec 29 11:21:24 UTC 2008


http://bugs.kde.org/show_bug.cgi?id=179039

           Summary: GUI for BASH (possibly other shells as well)
                    autocompletion feature
           Product: konsole
           Version: unspecified
          Platform: unspecified
        OS/Version: unspecified
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: konsole-devel at kde.org
        ReportedBy: romanujan at gmail.com


Version:            (using KDE 4.1.3)
Installed from:    Unspecified

I think most of the AmigaOS know a program called KingCON - it is a console
handler (something like terminal emulator in Unix/X11, but not quite), which
brings some nice features over the standard AmigaOS handler - one of them is
filename autocompletion. This is how it works on Amiga (well, more or less):

- user types some command and (possibly) a part of filename
- user presses the TAB key (just like any BASH user would)
- if there is just one possible match - it is autocompleted, just like in Unix
- if there is more than one possible match - a dialog box (requester in Amiga
terminology) with all the possibilities is displayed - user is able to pick a
file or even browse into directories

I think it would be nice to have such a dialog box in KDE (of course, as an
optional feature - some people might prefer the old way). The question is, how
to implement it properly. I can think of two ways:

1. Intercept TAB key in terminal emulator, display dialog box (check what the
user has already written to provide all the possible choices), 'type' the
choice into shell

Pros:
- does not need any change in the BASH, ZSH, etc.

Cons:
- hacky solution
- needs vast knowledge in Konsole - about different shells, and processes
running on the terminal
- any mistake may be very annoying, i. e. for user pressing TAB in the Midnight
Commander

2. Provide a DBus interface for communication between shell and terminal
emulator

Pros:
- more elegant, 'unixish' design
- DBus interface can be used in any shell, and by any terminal emulator, like
the Gnome Terminal
- such an interface could probably be used to deliver more interesting features
in the future (console app could explicitly tell the terminal emulator when it
displays the HTTP hyperlink, so no more guessing would be needed, etc.)

Cons:
- need some changes in the shell itself (but I think if BASH developers could
be convinced, the rest will follow sooner or later) - this will certainly need
a lot of social skills to accomplish :P
- changes to the shell needs to be done carefully - it should still be possible
to run BASH if DBus fails to operate for any reason, or even if it mas deleted
from the system


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list