Andreas Schwab wrote:

The default completion function is filename completion.  If you want
something different you need to write your own.
---
        Yes... so I look for a 'complete' function that I
can call with my options (or to choose some set of supplied
choices, like usernames or hostnames) -- but minimally, the
readline call I would use to set the options I want returned.

        But... I don't see a complete call in readline.

That's why I asked the question.

I wasn't expecting to "source" /<bash-completion-dir>/*.sh
and have bash shell commands interpret correctly in perl.

I don't see how to supply choices, or choose a non-default
set (like dir's only, or files ending in .gz, only).

How do I call the bash equiv of 'complete' in order to communicate
my 'choice(s)' to readline?


Meanwhile, in the semi-snarky department:

...  write my own?  Really?  My own code to make my own
custom selections -- what a primitive interface.

I always preferred 'smart' interfaces like:

sub read_users_mind {
  my mind_src="/dev/mind"
if [[ ! -c $mind_src || ! -O $mind_src ]]; then # be sure to only read our own mind_src=$(echo ~/.mind-backups/dflt-overrides) # hope we made a backup!
  fi
  magick_code(tm);
}

Cheers!
:-)


Reply via email to