Re: [Fish-users] How to define keybindings?

2012-11-27 Thread David Adam
On Tue, 27 Nov 2012, Luciano ES wrote:

> I investigated further and found some old residue that had still been 
> left around somehow.
> 
> Besides running 'dpkg -r fish' I also ran 'dpkg --purge fish' and 'dpkg 
> --purge fishfish'. I don't know how I got the idea of purging fishfish, 
> it just occurred to me and indeed dpkg seems to have found (and purged) 
> something.
> 
> Then I deleted (renamed) ~/.config/fish entirely and reinstalled the 
> latest fish with 'make install'.
> 
> All the problems vanished.
> 
> But I missed my config.fish file, brought it back and some of the 
> problems were back with it. Then I realized my config.fish file had 
> lines referencing /usr/share/fish which is old news. I realized all 
> those lines were already present in /usr/local/share/fish/config.fish so 
> I deleted them and now everything works fine.

Hi Luciano,

Without wanting to sound like a broken record, if you are on Debian you 
can use the builds I make from the git HEAD on a (mostly) daily basis.

http://www.mail-archive.com/fish-users@lists.sourceforge.net/msg03460.html

Let me know if you run into trouble. In particular you should probably 
`make deinstall` from your source tree and move all your references back 
to /usr from /usr/local.

Cheers

David

--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-27 Thread Ian Munsie
On Wed, Nov 28, 2012 at 11:21 AM, Luciano ES  wrote:
> Looks like most of my problems are solved.

Glad to hear :)

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
 -- Eric S. Raymond, 2005
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-27 Thread Luciano ES
Looks like most of my problems are solved.

I investigated further and found some old residue that had still been left 
around somehow. 

Besides running 'dpkg -r fish' I also ran 'dpkg --purge fish' and 'dpkg --purge 
fishfish'. I don't know how I got the idea of purging fishfish, it just 
occurred to me and indeed dpkg seems to have found (and purged) something.

Then I deleted (renamed) ~/.config/fish entirely and reinstalled the latest 
fish with 'make install'.

All the problems vanished.

But I missed my config.fish file, brought it back and some of the problems were 
back with it. Then I realized my config.fish file had lines referencing 
/usr/share/fish which is old news. I realized all those lines were already 
present in /usr/local/share/fish/config.fish so I deleted them and now 
everything works fine.

Almost everything. That Ctrl+z keybinding still doesn't work. But the Delete 
keybinding is working fine.

Thank you.

-- 
Luciano ES
>>
**
On Tue, 27 Nov 2012 14:51:07 -0800, ridiculous_fish wrote:

> 
> On Nov 26, 2012, at 11:38 PM, Luciano ES  wrote:
> 
> > Sigh... Ok, one thing at a time:
> > 
> >> See what? "bind -k dc" isn't in that list. Or maybe I'm just blind
> > 
> > You're right, it's not there. My mistake, forget about it. :-\
> > 
> > 
> >> I get the impression that fish_user_key_bindings is not being
> >> executed at all (try adding an echo "USER BINDINGS SET" to check
> >> or try calling it manually), 
> > 
> > That's right, it's not. I had already tried adding an echo
> > statement within the function, and it never printed out any output.
> > And running fish_user_key_bindings manually on the command line
> > works, the Delete binding I wanted worked fine. Now, why isn't
> > fish_user_key_bindings executed automatically?
> 
> Hi Luciano,
> 
> It sounds like you're working with fish 1.x config files, especially
> if you want to keep both installed at once.  If you run 'functions
> __fish_config_interactive' do you see a reference to
> fish_default_key_bindings in the output?
> 
> Another possibility is that $fish_key_bindings has been changed from
> the default.  The fish_user_key_bindings function is invoked like so:
> 
>   if test "$fish_key_bindings" =
> fish_default_key_bindings fish_default_key_bindings
>   #Load user key bindings if they are defined
>   if functions --query fish_user_key_bindings
> > /dev/null fish_user_key_bindings
>   end
>   else
>   eval $fish_key_bindings ^/dev/null
>   end
> 
> 
> > 
> >> which leads me to suspect that you may have some ancient
> >> fish files lying around somewhere that you haven't cleaned up that
> >> predate the introduction of that function.
> > 
> > In fact, yes, I still have (or rather had - read further) the old
> > fish lying around in case the new fish didn't quite work out for me.
> > 
> > 
> >> Have you done a dpkg -r fish as the thread you posted suggested to
> >> clean up any old version in your package manager?
> > 
> > I just did, and all hell broke loose. The current shell got all
> > messy, lots of error messages flying every which way. I ran quickly
> > to the source/build/compile directory I used yesterday and ran
> > 'make install' again. It got better, but I still have problems.
> > 
> > I looked for /usr/share/fish, it's not there anymore. I
> > deleted /usr/local/share/fish/ and ran 'make install' again, I
> > still have problems:
> > 
> > First, the command line is all broken, many keys are not working.
> > 
> > Every time I try a new session, I get complaints about my
> > fish_prompt.fish file, some problem with prompt_pwd.
> > 
> > I also get this error, which looks like a bug to me:
> > 
> > fish: Unknown command "__fish_config_interactive"
> > /usr/local/share/fish/config.fish (line 95):
> > __fish_config_interactive ^
> > in function "__fish_on_interactive",
> > called on standard input,
> > 
> > in event handler: handler for generic event "fish_prompt"
> > 
> > 
> > It is complaining about /usr/local/share/fish/config.fish, but I
> > never touched that file. Whatever is wrong with it, I didn't do it.
> > 
> > Please advise.  :-(
> 
> It sounds like fish 2.0 was using the functions directory from 1.x,
> and when you removed fish 1.x, fish 2.0 could no longer find its
> functions. What does 'echo $fish_function_path' output? Do any of the
> directories contain __fish_config_interactive.fish?
> 
> For the record, fish 2.0 first tries to find its functions by looking
> relative to the binary itself, to support scenarios like 0install.
> That is, if fish detects that it is running from /foo/bar/bin/fish,
> it looks for /foo/bar/share/fish/functions. If that fails, it falls
> back to using the compiled-in paths, i.e. the --prefix option to
> configure.
> 
> Hope that helps,
> _fish
> 


--
Keep yo

Re: [Fish-users] How to define keybindings?

2012-11-27 Thread ridiculous_fish

On Nov 26, 2012, at 11:38 PM, Luciano ES  wrote:

> Sigh... Ok, one thing at a time:
> 
>> See what? "bind -k dc" isn't in that list. Or maybe I'm just blind
> 
> You're right, it's not there. My mistake, forget about it. :-\
> 
> 
>> I get the impression that fish_user_key_bindings is not being executed
>> at all (try adding an echo "USER BINDINGS SET" to check or try calling
>> it manually), 
> 
> That's right, it's not. I had already tried adding an echo statement within 
> the function, and it never printed out any output. 
> And running fish_user_key_bindings manually on the command line works, the 
> Delete binding I wanted worked fine.
> Now, why isn't fish_user_key_bindings executed automatically?

Hi Luciano,

It sounds like you're working with fish 1.x config files, especially if you 
want to keep both installed at once.  If you run 'functions 
__fish_config_interactive' do you see a reference to fish_default_key_bindings 
in the output?

Another possibility is that $fish_key_bindings has been changed from the 
default.  The fish_user_key_bindings function is invoked like so:

if test "$fish_key_bindings" = fish_default_key_bindings
fish_default_key_bindings
#Load user key bindings if they are defined
if functions --query fish_user_key_bindings > /dev/null
fish_user_key_bindings
end
else
eval $fish_key_bindings ^/dev/null
end


> 
>> which leads me to suspect that you may have some ancient
>> fish files lying around somewhere that you haven't cleaned up that
>> predate the introduction of that function.
> 
> In fact, yes, I still have (or rather had - read further) the old fish lying 
> around in case the new fish didn't quite work out for me.
> 
> 
>> Have you done a dpkg -r fish as the thread you posted suggested to
>> clean up any old version in your package manager?
> 
> I just did, and all hell broke loose. The current shell got all messy, lots 
> of error messages flying every which way.
> I ran quickly to the source/build/compile directory I used yesterday and ran 
> 'make install' again. It got better, but I still have problems.
> 
> I looked for /usr/share/fish, it's not there anymore. I deleted 
> /usr/local/share/fish/ and ran 'make install' again, I still have problems:
> 
> First, the command line is all broken, many keys are not working.
> 
> Every time I try a new session, I get complaints about my fish_prompt.fish 
> file, some problem with prompt_pwd.
> 
> I also get this error, which looks like a bug to me:
> 
> fish: Unknown command "__fish_config_interactive"
> /usr/local/share/fish/config.fish (line 95): __fish_config_interactive
> ^
> in function "__fish_on_interactive",
>   called on standard input,
> 
> in event handler: handler for generic event "fish_prompt"
> 
> 
> It is complaining about /usr/local/share/fish/config.fish, but I never 
> touched that file. Whatever is wrong with it, I didn't do it.
> 
> Please advise.  :-(

It sounds like fish 2.0 was using the functions directory from 1.x, and when 
you removed fish 1.x, fish 2.0 could no longer find its functions. What does 
'echo $fish_function_path' output? Do any of the directories contain 
__fish_config_interactive.fish?

For the record, fish 2.0 first tries to find its functions by looking relative 
to the binary itself, to support scenarios like 0install. That is, if fish 
detects that it is running from /foo/bar/bin/fish, it looks for 
/foo/bar/share/fish/functions. If that fails, it falls back to using the 
compiled-in paths, i.e. the --prefix option to configure.

Hope that helps,
_fish


--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-27 Thread ridiculous_fish

On Nov 26, 2012, at 10:12 PM, Ian Munsie  wrote:

> On Tue, Nov 27, 2012 at 2:34 PM, Luciano ES  wrote:
>> function fish_user_key_bindings
>>bind -k dc delete-or-exit
>>bind \cz 'commandline ""'
>> end
>> 
>> I press Ctrl+z. Nothing happens.
> 
> Nothing happens for me either - might be a bug, though something in
> the back of my mind is nagging at me saying that you can't bind
> anything to ctrl+z unless you first remove susp with stty - only,
> changing that doesn't seem to stick in fish (I wonder if it's
> resetting the terminal characteristics - I'd need to read the code).

Here's where fish sets up the terminal characteristics. As Ian says, fish does 
not disable VDSUSP, so control-Z generates a signal instead of being sent to 
fish. If fish were smarter it might change this dynamically depending on what 
bindings are installed.

void reader_init()
{
tcgetattr(0,&shell_modes);/* get the current terminal modes */
memcpy(&saved_modes,
   &shell_modes,
   sizeof(saved_modes)); /* save a copy so we can reset the 
terminal later */

shell_modes.c_lflag &= ~ICANON;   /* turn off canonical mode */
shell_modes.c_lflag &= ~ECHO; /* turn off echo mode */
shell_modes.c_cc[VMIN]=1;
shell_modes.c_cc[VTIME]=0;

// PCA disable VDSUSP (typically control-Y), which is a funny job control
// function available only on OS X and BSD systems
// This lets us use control-Y for yank instead
#ifdef VDSUSP
shell_modes.c_cc[VDSUSP] = _POSIX_VDISABLE;
#endif



--
Keep yourself connected to Go Parallel: 
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-27 Thread Luciano ES
I rebooted, and all the problems are still there.


-
fish: Unknown command "__fish_config_interactive"
/usr/local/share/fish/config.fish (line 95): __fish_config_interactive
 ^
in function "__fish_on_interactive",
called on standard input,

in event handler: handler for generic event "fish_prompt"

fish: Unknown command "prompt_pwd"
/root/.config/fish/functions/fish_prompt.fish (line 6): prompt_pwd
^
in command substitution
called on line 30 of file 
"/root/.config/fish/functions/fish_prompt.fish",

in function "fish_prompt",
called on standard input,

in command substitution
called on standard input,

--


Note that fish is not my $SHELL. It's tcsh. I don't trust fish enough for 
something like that. What I do is have stjerm (Quake-like drop down terminal 
application, similar to Tilda) configured to run fish as a startup command for 
every terminal window it creates.

-- 
Luciano ES
>>
**
On Tue, 27 Nov 2012 20:30:01 +1100, Ian Munsie wrote:

> reboot


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-27 Thread Ian Munsie
reboot

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Luciano ES
Sigh... Ok, one thing at a time:

> See what? "bind -k dc" isn't in that list. Or maybe I'm just blind

You're right, it's not there. My mistake, forget about it. :-\


> I get the impression that fish_user_key_bindings is not being executed
> at all (try adding an echo "USER BINDINGS SET" to check or try calling
> it manually), 

That's right, it's not. I had already tried adding an echo statement within the 
function, and it never printed out any output. 
And running fish_user_key_bindings manually on the command line works, the 
Delete binding I wanted worked fine.
Now, why isn't fish_user_key_bindings executed automatically?

> which leads me to suspect that you may have some ancient
> fish files lying around somewhere that you haven't cleaned up that
> predate the introduction of that function.

In fact, yes, I still have (or rather had - read further) the old fish lying 
around in case the new fish didn't quite work out for me.


> Have you done a dpkg -r fish as the thread you posted suggested to
> clean up any old version in your package manager?

I just did, and all hell broke loose. The current shell got all messy, lots of 
error messages flying every which way.
I ran quickly to the source/build/compile directory I used yesterday and ran 
'make install' again. It got better, but I still have problems.

I looked for /usr/share/fish, it's not there anymore. I deleted 
/usr/local/share/fish/ and ran 'make install' again, I still have problems:

First, the command line is all broken, many keys are not working.

Every time I try a new session, I get complaints about my fish_prompt.fish 
file, some problem with prompt_pwd.

I also get this error, which looks like a bug to me:

fish: Unknown command "__fish_config_interactive"
/usr/local/share/fish/config.fish (line 95): __fish_config_interactive
 ^
in function "__fish_on_interactive",
called on standard input,

in event handler: handler for generic event "fish_prompt"


It is complaining about /usr/local/share/fish/config.fish, but I never touched 
that file. Whatever is wrong with it, I didn't do it.

Please advise.  :-(


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Ian Munsie
On Tue, Nov 27, 2012 at 5:35 PM, Luciano ES  wrote:
> Also, note that it won't work on new sessions although it is listed by the 
> 'bind' command:
>

> $ bind
> [many lines elided]
> ...
> bind \e\< beginning-of-buffer
> bind \e\> end-of-buffer
> bind \el __fish_list_current_token
> bind \ew 'set tok (commandline -pt); if test $tok[1]; whatis $tok[1]; 
> commandline -f repaint; end'
> bind \cl 'clear; commandline -f repaint'
> bind \cc 'commandline ""'
> bind \cu backward-kill-line
> bind \cd delete-or-exit
> bind \ep __fish_paginate
>
> See? It's there. But it doesn't work.

See what? "bind -k dc" isn't in that list. Or maybe I'm just blind
(puts list in text file and greps for dc) Nope, not there. \cd
(ctrl+d) is there, but that's a default binding.

I get the impression that fish_user_key_bindings is not being executed
at all (try adding an echo "USER BINDINGS SET" to check or try calling
it manually), which leads me to suspect that you may have some ancient
fish files lying around somewhere that you haven't cleaned up that
predate the introduction of that function.

Have you done a dpkg -r fish as the thread you posted suggested to
clean up any old version in your package manager?

Do you have a /usr/share/fish/functions or a
/usr/local/share/fish/functions (or otherwise a
$PREFIX/share/fish/functions) from an old version that hasn't been
cleaned up?

Did you do a make install to install the new $PREFIX/share/fish/functions?

Have you made certain that the universal variable server has been
restarted since updating fish? (reboot if you are unsure).



> I don't understand what you mention about 'susp with stty' because I am not 
> familiar with it.

man 1 stty, though tbh I'm not very familiar with it either - I
generally refer to one of my colleagues if I need to worry about
terminal characteristics. But yeah, not being able to bind ctrl+z is
definitely a bug in fish regardless of the cause.

Cheers,
-Ian

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
 -- Eric S. Raymond, 2005
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Luciano ES
I forgot to mention that  works fine if 
typed/entered on the command line, I press Delete and the shell exits, but then 
it won't work in new sessions, unless I define it on the command line manually 
again.

Also, note that it won't work on new sessions although it is listed by the 
'bind' command:

$ bind
[many lines elided]
...
bind \e\< beginning-of-buffer
bind \e\> end-of-buffer
bind \el __fish_list_current_token
bind \ew 'set tok (commandline -pt); if test $tok[1]; whatis $tok[1]; 
commandline -f repaint; end'
bind \cl 'clear; commandline -f repaint'
bind \cc 'commandline ""'
bind \cu backward-kill-line
bind \cd delete-or-exit
bind \ep __fish_paginate

See? It's there. But it doesn't work.

The other binding  does not work even if entered 
manually on command line. It is also not listed by the 'bind' command. I don't 
understand what you mention about 'susp with stty' because I am not familiar 
with it. I can however assure you that Ctrl+z to clear the command line works 
fine on tcsh. I have had that binding in tcsh for three or four years, and it 
has allways worked. It still does.

Thank you for your attention.

-- 
Luciano ES
>>
**
On Tue, 27 Nov 2012 17:12:14 +1100, Ian Munsie wrote:

> On Tue, Nov 27, 2012 at 2:34 PM, Luciano ES  wrote:
> > function fish_user_key_bindings
> > bind -k dc delete-or-exit
> > bind \cz 'commandline ""'
> > end
> >
> > I press Ctrl+z. Nothing happens.
> 
> Nothing happens for me either - might be a bug, though something in
> the back of my mind is nagging at me saying that you can't bind
> anything to ctrl+z unless you first remove susp with stty - only,
> changing that doesn't seem to stick in fish (I wonder if it's
> resetting the terminal characteristics - I'd need to read the code).
> 
> > I press Delete. Nothing happens.
> 
> With your above function pressing delete closes the shell for me.
> 
> > What have I done wrong?
> 
> Nothing obvious - what happens if you use this instead to debug
> things?
> 
> function fish_user_key_bindings
> bind -k dc 'commandline "delete pressed"'
> bind \cz 'commandline "ctrl+z pressed"'
> bind \cc 'commandline "ctrl+c pressed"'
> bind \cd 'commandline "ctrl+d pressed"'
> end
> 
> With this function ctrl+c, ctrl+d and delete should all produce a
> message, though ctrl+z does nothing for me.
> 
> > Note: I am running whatever version I downloaded from the git
> > repository yesterday. Neither fish_user_key_bindings nor
> > fish_user_keybindings works.
> 
> It's been about a month since I last pulled from upstream - I'll build
> the latest version and see if anything has changed, though if
> something had fundamentally broken in this area I would have expected
> someone to complain that my vi-mode.fish had stopped working.
> 
> Cheers,
> -Ian
> 


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Ian Munsie
> It's been about a month since I last pulled from upstream - I'll build
> the latest version and see if anything has changed

Latest version works fine for me.

-I

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
 -- Eric S. Raymond, 2005
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Ian Munsie
On Tue, Nov 27, 2012 at 2:34 PM, Luciano ES  wrote:
> function fish_user_key_bindings
> bind -k dc delete-or-exit
> bind \cz 'commandline ""'
> end
>
> I press Ctrl+z. Nothing happens.

Nothing happens for me either - might be a bug, though something in
the back of my mind is nagging at me saying that you can't bind
anything to ctrl+z unless you first remove susp with stty - only,
changing that doesn't seem to stick in fish (I wonder if it's
resetting the terminal characteristics - I'd need to read the code).

> I press Delete. Nothing happens.

With your above function pressing delete closes the shell for me.

> What have I done wrong?

Nothing obvious - what happens if you use this instead to debug things?

function fish_user_key_bindings
bind -k dc 'commandline "delete pressed"'
bind \cz 'commandline "ctrl+z pressed"'
bind \cc 'commandline "ctrl+c pressed"'
bind \cd 'commandline "ctrl+d pressed"'
end

With this function ctrl+c, ctrl+d and delete should all produce a
message, though ctrl+z does nothing for me.

> Note: I am running whatever version I downloaded from the git repository 
> yesterday. Neither fish_user_key_bindings nor fish_user_keybindings works.

It's been about a month since I last pulled from upstream - I'll build
the latest version and see if anything has changed, though if
something had fundamentally broken in this area I would have expected
someone to complain that my vi-mode.fish had stopped working.

Cheers,
-Ian

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
 -- Eric S. Raymond, 2005
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Luciano ES
Well, thank you! I was looking forward to getting a reply on that topic.

But your advice is not helping me. Let's see:

I open this file:

~/.config/fish/config.fish

Then I add this function:

function fish_user_key_bindings
bind -k dc delete-or-exit
bind \cz 'commandline ""'
end

I save the config.fish file. I open another shell window and type:
$ hello

I press Ctrl+z. Nothing happens.
I press Ctrl+c. The command line is cleared. Empty.

I press Delete. Nothing happens.
I press Ctrl+d. The shell exits.

What have I done wrong?

Note: I am running whatever version I downloaded from the git repository 
yesterday. Neither fish_user_key_bindings nor fish_user_keybindings works.

-- 
Luciano ES
>>
**
On Tue, 27 Nov 2012 14:16:45 +1100, Ian Munsie wrote:

> On Thu, Nov 22, 2012 at 2:33 PM, Luciano ES  wrote:
> > I am doing my research so I found this:
> >
> > https://github.com/fish-shell/fish-shell/issues/230
> >
> > But holy cow, what a confusing thread! I have read it at least 10
> > times and for the life of me I still have no idea where custom key
> > bindings should go! Can someone please clarify?!!
> 
> function fish_user_key_bindings in config.fish
> 
> Or, if your not running quite bleeding edge fish, it's function
> fish_user_keybindings (no underscore in keybindings)
> 
> -I
> 


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


Re: [Fish-users] How to define keybindings?

2012-11-26 Thread Ian Munsie
On Thu, Nov 22, 2012 at 2:33 PM, Luciano ES  wrote:
> I am doing my research so I found this:
>
> https://github.com/fish-shell/fish-shell/issues/230
>
> But holy cow, what a confusing thread! I have read it at least 10 times and 
> for the life of me I still have no idea where custom key bindings should go! 
> Can someone please clarify?!!

function fish_user_key_bindings in config.fish

Or, if your not running quite bleeding edge fish, it's function
fish_user_keybindings (no underscore in keybindings)

-I

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
 -- Eric S. Raymond, 2005
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users