Bash and Zsh will already handle your first example without any tinkering. As Christian stated the completion systems are quite mature, I tend to prefer zsh myself.
A good book that I recommend to get started is "From Bash to Zsh". I found it easier to start with rather the supplied reference documentation. Hope that helps, Wayne On Wed, Dec 24, 2014 at 04:56:02PM +0200, Gregory Edigarov wrote: > Hi, > > 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? > > like for example: > i want it to complete from a result of ls, so I give the ls command, > look at its output, then for example > 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? > > -- > With best regards, > Gregory Edigarov