Complete directory arguments with "/" after menu completion? #297
-
When there's a single option for completion ble adds a trailing slash to directories: $ cd /e<TAB>
$ cd /etc/ But if there are multiple choices it doesn't: $ cd /s<TAB><TAB><TAB>
/sbin@ /srv/ /sys/
$ cd /srv
By the way, is there a way that the first |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
A trailing slash is added when the completion is completed.
This is because the completion immediately completes when there is a unique candidate.
While selecting a completion candidate in the menu, the trailing slash isn't added but will later be added on the completion of the menu completion. You need to press RET to complete the completion, or otherwise the completion would be canceled prematurely.
That's
You can write your own programmable completion so that the candidates include the trailing slashes within themselves. (But as far as
Have you tried # Widget "menu-complete" in ble
ble-bind -f C-i menu-complete
ble-bind -f TAB menu-complete
# Bindable function "menu-complete" in readline (plain Bash without ble)
bind '"\C-i": menu-complete' but maybe the behavior of the widget |
Beta Was this translation helpful? Give feedback.
A trailing slash is added when the completion is completed.
This is because the completion immediately completes when there is a unique candidate.
While selecting a completion candidate in the menu, the trailing slash isn't added but will later be added on the completion of the menu completion. You need to press RET to complete the completion, or otherwise the completion would be canceled prematurely.
That's
bin…