On 12/14/05, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
>
> On Wed, December 14, 2005 7:49 am, Philip Ganchev wrote:
> > Is it possible to insert quoted characters in Fish, such as a bell?
> > ^V is the default readline keybinding, so ^V^G inserts a bell.
>
> Fish supports the standard C syntax for escaped characters, i.e. \xXX,
> \uXXXX or \UXXXXXXXX can be used to write an 8, 16 or 32 bit character
> using hex. \oXXX can be used to write a 8 bit character using octal.
>
> V is the 22:nd character of the alphabet, so ^V is character 22, or 16
> hexadecimal. 'echo \x16' should work, I guess.

\x16 does not work, it prints a garbage character, while "echo \u26" prints "&".

> Looking at the fish code, it seems that \b is also supported. Maybe that
> works too? I'm too lazy to test since I have turned the bell of on my
> terminal.

Yes, "echo -e '\a' " works.  \b is backspace.

It would be nice if escaped characters like \a and \x16 were
highlighted somehow, say in pink?  I expect your Christmas Tree
objection - I suggested highlighting of strings earlier.

Anyway, numbers are not very friendly as character names.  The ^V
framework seems good because you can insert characters directly.  For
example,

bash> echo "hello<^V><Tab>world"

inserts a tab character:

bash> echo "hello       world"

Friendlier than a placeholder like \t, I think.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to