On Sun, Dec 28, 2008 at 4:04 PM, Sy Ali <sy1...@gmail.com> wrote:
...
> problem 1:
>
> I don't seem to be able to bind the way I expect.  Example:
>
>> bind -k home beginning-of-line
>> test string<home>
>> test string[1~

It seems the named keys do not work when the corresponding character
sequence is bound to something different. If so, then that is a bug.

> It's odd, because I'd had home/end rebound successfully before, by
> pressing the actual keys during the bind process, like so:
>
>> bind <home> beginning-of-line
>> bind <end> end-of-line

I guess this is because Fish inserts the character sequence if that
sequence is not bound.

> I don't want to do things this way though.  What if I have 'home' and
> 'end' already bound, and next year I want to re-bind them to something
> new?  At that point, I couldn't get the 'home' or 'end' raw characters
> back. (I vaguely remember a way, but I cannot recall enough to search
> for it)

I am usually pointed to the command 'showkey', which for me generates
the ascii code of ^[[H for Home. I don't know how to use it with
'bind'.

...
> Also, how would I make my bind changes permanent?  Is there just some
> text file that I could edit?  That would be easiest.

Once you discover the correct command, you can add it to your
initialization file, ~/.config/fish/config.fish .


> problem 2:
>
> Also, when pressing home, I am expecting the current string to be
> remembered and for me to be shown the previous command.
...

You probably mean 'UpArrow', not 'home'. In Fish, UpArrow searches
through the history of executed commands for a string that contains
the current string as a substring. If you don't want to search, you
can press ^U to save the line in the killring, and UpArrow to go
through history. Then press ^Y to append the contents of the killring
at the cursor position.

> ... I press control-c to kill what I'm doing.  Then
> I press home to look through my history.  It still goes through its
> searching mode.  ...

This works for me as expected, assuming you mean UpArrow instead of
'home'. (Home also works as expected.) What terminal do you use? What
are the contents of your "TERM" and "LC_ALL" variables?

> Even on a blank line (new shell), I do this:
>
>> <up>
>> (previous command)
>> <control-c>
>> <up>
>> (second-to-previous command)
...

This works for me as you described, and I agree that it should bring
up the previous command. Also, pressing ^C, UpArrow, DownArrow brings
back the previous command. Pressing ^C, DownArrow, UpArrow has the
same end result. This may be intended, but it is probably a bug.

> problem 3:
>
...
>  when viewing the command history and pressing <home> it wipes out the line.
>
> I am expecting it to move my cursor to the beginning of the line.
...

This works for me as expected.

------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to