On 2014-12-24, Gregory Edigarov <ediga...@qarea.com> wrote: > an interesting question has just come to my head: > do you know of any shell that could complete from the terminal output of > any of the previous command?
That would require serious contortions since the stdout/stderr output of commands run from the shell does not pass through the shell. > i type 'cat <some prefix>TAB' and it completes from the result of ls. > now if i want for example ssh to any host, i give command cat > .ssh/config, and then ssh <some prefix>TAB. > is that at all possible? bash, tcsh, and zsh each support absurdly complex programmable completion schemes that may offer better ways to do what you want. (E.g. why complete ssh from previous cat output, why not complete directly from .ssh/config or .ssh/known_hosts?) -- Christian "naddy" Weisgerber na...@mips.inka.de