[PATCH 1/1] guestfish: Tab-complete single / double quoted filenames containing space -- add fish_completion_word_break_characters_hook
This patch introduces fish_completion_word_break_characters_hook - Readline's rl_completion_word_break_hook for guestfish so tab-completion on / for single / double quoted filenames containing space would be possible too - this covers part: "In addition:
<fs> ls "/Program Files/<tab> doesn't show any files to complete."
from RH BZ#547488. Thank you, Jan. -- Jan iankko Lieskovsky P.S.: Feel free to remove the comment lines, if you find them unnecessary. P.S.#2: Have got a patch for completion of unquoted filenames containing space too already, but need to give it further testing => will submit in separated post later.
On Sun, May 19, 2013 at 09:23:59AM -0400, Jan Lieskovsky wrote:
+/* Readline word break hook for (guest)fish + * Exclude space from the set of word break characters if Readline's buffer + * contains path and some of possible tab-completions includes space. + * Return basic / default set of word break characters otherwise + */ +char * +fish_completion_word_break_characters (void)
This function should be declared static. I tried these patches but they don't quite work for me:
<fs> ll "/Program<TAB><TAB>
<fs> ll "/Program Files"/
gives: libguestfs: error: readdir: opendir: /Program Files": No such file or directory It seems to be including a rogue quote in the filename. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
participants (2)
-
Jan Lieskovsky -
Richard W.M. Jones