[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Granular command completion
From: |
Roman Bigler (Privat) |
Subject: |
[Help-bash] Granular command completion |
Date: |
Tue, 27 Nov 2018 21:53:47 +0100 |
Hello Bashers,
this might be a feature request, hope I’m posting to the correct place. If not,
feel free to point me to the right place.
I’d like to customize bash’s command completion to _only_ include aliases.
Quoting the documentation, bash’s default completion tries in this order:
« The actual completion performed is application-specific. Bash attempts
completion treating the text as a variable (if the text begins with ‘$’),
username (if the text begins with ‘~’), hostname (if the text begins with
address@hidden), or command (including aliases and functions) in turn. »
These seem to be customizable, with the exception of the command completion?
Reasons for my somewhat obscure requirement is the fact that I have to work
under resource-constrained environments,
which at the same time employ a huge $PATH containing myriads of commands,
which are abysmally slow to enumerate (not bash’s fault).
At the same time, I’m using bash to implement lightweight "shells” that, while
being fully featured under the hood, (aim to) expose
a limited command subset in autocompletion for user convenience.
(I suppose the latter could in theory be achieved by employing readline
directly, but it’s much more convenient configuring bash
accordingly).
I’ve managed to tell bash to complete only aliases upon an empty command line,
but regular command completion still takes place
when parts on an alias are to be completed.
Cheers & thanks in advance,
roeme
P.S. If this indeed qualifies as a feature request…where to submit?
P.P.S. First post here, apologies if I inadvertently violated this list’s
etiquette
- [Help-bash] Granular command completion,
Roman Bigler (Privat) <=