[patch] Command completion should be enhanced

Bug #53887 reported by Sami Pietila
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

When bash has more than one completion alternatives, it prints the list of possible completions. If user presses the TAB again, the list is showed again. There should be a completion mode which browses/suggests a item from the completion list instead of showing the list again. This would be like a mixture of the default completion mode and the menu-complete.

Revision history for this message
Sami Pietila (sampie) wrote :

There is a patch to demonstrate how this could work. This is only a proof-of-concept patch.

There is a new completion mode called browse-complete. The mode can be activated by entering the following line to the inputrc

TAB: browse-complete

Revision history for this message
Albrecht Mühlenschulte (a7p) wrote :

Sorry, imo this is a feature request - thanks for your report. Your idea might get more attention and have the possibility of being implemented if you would submit a specification for this.

You should first check whether it already exists at the Ubuntu specs page (https://launchpad.net/distros/ubuntu/+specs) in Launchpad. If that is the case, feel free to contact the drafter of that spec about your comments/suggestions. Otherwise you can start writing a spec following the steps described in https://wiki.ubuntu.com/FeatureSpecifications.

Changed in bash:
status: Unconfirmed → Rejected
Revision history for this message
Matthias Klose (doko) wrote :

> Sorry, imo this is a feature request - thanks for your report.
> Your idea might get more > attention and have the possibility
> of being implemented if you would submit a specification for this.

wrong, no spec is needed.

Changed in bash:
importance: Undecided → Wishlist
status: Rejected → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

forwarded upstream

Revision history for this message
Sami Pietila (sampie) wrote :

Any news from upstream?

Revision history for this message
Mika Fischer (zoop) wrote :

This is a feature request for the bash package not bash-completion.

Mika Fischer (zoop)
Changed in bash:
status: Confirmed → Triaged
Revision history for this message
Sami Pietila (sampie) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

Sami, please submit this patch to the upstream maintainer himself and report back here.

Changed in bash:
status: Triaged → Incomplete
Revision history for this message
Sami Pietila (sampie) wrote :

There have been attempts to contact the upstream. Unfortunately, there have been no answers from the upstream. Dead upstream?

Changed in bash:
status: Incomplete → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

bash-4.0 was released. does the patch apply for 4.0? could you resend it upstream, and attach the URL of the email to the bash-bug ML?

Revision history for this message
Sami Pietila (sampie) wrote :

Hi,

There was some changes in bash 4.0, which pervented the bash-3.2 patch to apply successfully.

Here is a patch for bash 4.0.

Matthias, can you please forward the patch to the upstream? Perhaps you have better luck than me.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Has this patch been forwarded upstream? Could you please take this up?

Revision history for this message
Sami Pietila (sampie) wrote :

Hi,

I just sent an email to upstream (<email address hidden>). I just received:

"This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
....
"

So, I am not sure if anybody receives the mails sent to the upstream, but let's wait if there will be an answer.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Maybe one of the recipient doesn't exist. Thanks for forwarding the patch!

tags: added: patch-forwarded-upstream
Revision history for this message
Sami Pietila (sampie) wrote :

I received a reply from upstream asking details about the behavior of the patch. I sent more detailed explanation about the behavior concept.

Revision history for this message
Alba Nader (sharepass12) wrote :

Whats the status of this?

Revision history for this message
Sami Pietila (sampie) wrote :

For bash 4.2 the maintainers have implemented features which can be activated to get the wanted behavior. See .inputrc config options.

However, it can be seen from bash-4.2 source code that there is a bug in the implementation which prevents needed set show-all-if-ambiguous and set menu-complete-display-prefix to be activated at the same time.

I reported this bug to bash maintainers 2012-March and sent the patch to fix the bug, but at least ubuntu 12.10 is still shipping a bash version with the bug.

--- Configuration for .inputrc ---
TAB:menu-complete
set show-all-if-ambiguous on
set menu-complete-display-prefix on
---

Revision history for this message
Sami Pietila (sampie) wrote :

There is now bash 4.3-rc2, which allows show-all-if-ambiguous and menu-complete-display-prefix to be used at the same time.

However, it seems that bash completes directory names with ending / symbol. My original patch completed directories without the / so that user can type / and then push tab to indicate that he/she would like enter the directory and then continue browsing there.

With bash 4.3-rc2, I am not sure how to continue browsing into a directory which is shown as an completion.

I sent a question to upstream if there is an option to prevent bash from writing / at the end of directory name completions when browsing.

Revision history for this message
Sami Pietila (sampie) wrote :

Upstream has now configuration parameters to make almost desired behavior.

Changed in bash (Ubuntu):
status: Confirmed → Invalid
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.