Re: bash completion after a multiline string
On 7/2/21 2:13 AM, Phi Debian wrote: Thanx Chet for taking time to explain. May be readline API should have a way to know that a quote ['"`] is opened ine many previous lines and the first occurence of such quote ine the current one , is a closing one. There might be a way to do it using the current set of APIs. I'll have to think about it a little more. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: bash completion after a multiline string
Thanx Chet for taking time to explain. May be readline API should have a way to know that a quote ['"`] is opened ine many previous lines and the first occurence of such quote ine the current one , is a closing one. Well I guess this is too much of a trouble for something living this way for such a long time :) Cheers,
Re: bash completion after a multiline string
On 6/22/21 3:52 AM, Phi Debian wrote: When doing $ echo foo "bar" /tm I got /tm expanded to /tmp/ that is indeed correct. But if I do $ echo foo "bar more bar" /tm No completion is done. My question is doest this behavior a feature or a bug? Neither, really, it's just a consequence of readline being line-oriented and a little more application-agnostic than you think. Readline understands how to complete within partially-quoted strings, or unclosed quoted strings if you prefer, since that's something fairly common across all the applications that use it. Since it's line-oriented, it doesn't know about quotes on previous lines, nor whether or not previous lines should logically be considered part of the current line. If you combine these two things, you should be able to see why the word you're trying to complete is ` /tm'. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: bash completion after a multiline string
May be posting a link is not appropriate so I cut/paste it here I bumped into this problem regarding bash completion, can't find reference to it. When doing $ echo foo "bar" /tm I got /tm expanded to /tmp/ that is indeed correct. But if I do $ echo foo "bar more bar" /tm No completion is done. My question is doest this behavior a feature or a bug? My bash version is GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) Thanx in advance.
bash completion after a multiline string
Hi All, I posted a question to STKO and someone suggest I should open a 'feature request' here. https://stackoverflow.com/questions/68065039/bash-completion-after-a-multiline-string Thanx in advance, Phi