From: sfeam (E. Merritt) <eam...@gm...> - 2012-03-25 17:44:25
|
On Saturday, 24 March 2012, Tait wrote: > > Something new as of gp 4.6.0 on Windows is that a tab character, entered > into the interactive terminal, expands into a filename. Can this behavior > be disabled via some configuration? If you are talking about tab completion in the readline library, it can be disabled by putting set disable-completion on in the file ~/.inputrc (or whatever the Windows equivalent is). If you are talking about tab completion in the built-in readline code, I don't see any way to disable it currently. That seems like a reasonable feature to add. > I often develop files with \-continuations, e.g. > plot '-' title "nzrgrdr" \ > '-' title "ghlallaghp" \ > '-' title "xyzpthrtk" > > Note the tab-indent on the line continuations. When I 'load' such a file > into gnuplot, it works fine, but often in the course of development or > helping others, I copy-and-paste these into the interactive terminal. > This worked before, but now breaks because the leading tab expands to a > filename, which is of course a syntax error. Hmm. This doesn't happen under linux because the cut-and-paste operation itself replaces tabs with spaces. I have no idea whether Windows can be configured to do the same thing, but that would be another work-around you might investigate. > Vim works around issues like this by using paste detection, but the > easier solution is probably just to disable filename-expansion. The > current situation makes it impossible to interactively type anything > containing a tab. For example, print "x y result" even fails > because the tab cannot be inserted without turning into a filename. The > usual character-escape or ctrl-v quote-literal terminal tricks that would > work on *nix do not work on the Windows terminal. Forgive my Windows ignorance, but... I can understand that ctrl-V doesn't work here because Windows thinks that it means "paste" rather than "verbatim". But isn't there some other control character that is equivalent to *nix ctrl-V? |