Notification is sent using an OSC 777 escape sequence as described at
http://known.phyks.me/2014/local-notifications-for-weechat-and-urxvt.
The specific notification is crafted to match that emitted by bash
when running under Fedora 22 with the "vte-profile" RPM installed.
See the code for "__vte_prompt_command" starting at
http://pkgs.fedoraproject.org/cgit/vte291.git/tree/vte291-command-notify.patch#n307
to see exactly what bash produces. My approach is, however, a bit
more paranoid about control characters embedded in commands.
Gnome-terminal 3.16 responds to this escape sequence by posting a
desktop notification if the containing terminal window does not have
focus. This lets the user know that a long-running background command
has completed. Job notification is promoted as a Fedora 22 feature
(http://fedoramagazine.org/terminal-job-notifications-in-fedora-22-workstation/),
so it would be good for fish users to be benefit from it.
Conversely, anyone who does not want this feature can use "functions
--erase __notify_vte_command_completed" to turn it off.
With the fix for #365, fish_command_not_found event handlers
receive the command and all of its arguments. But commands
like /usr/lib/command-not-found expect only the command name.
So when invoking an external command, just pass the command
name, not all of the arguments.
Remove comment that AFAICT is not true anymore.
Ensure someone setting __fish_active_key_bindings as a universal
variable doesn't screw up the initial keybinding load.
Previously, fish's command_not_found handler would be installed in
__fish_config_interactive. Errors that occured early in startup (e.g. in
config.fish) or in non-interactive mode would therefore not be reported.
With this change, fish now exposes its default cnf handler as
__fish_default_command_not_found_handler . config.fish then installs a
cnfh that invokes the default. When fish goes interactive, the initial
cnfh is overwritten with a fancier one, that may in turn fall back to
invoking the default.
commit d81ae2665f
Author: Max Gonzih <gonzih@gmail.com>
Date: Sun Feb 2 16:22:18 2014 +0300
Check for command-not-found command on suse
commit 004b794c82
Author: Max Gonzih <gonzih@gmail.com>
Date: Sun Feb 2 14:04:41 2014 +0300
Fix cnf handler for Suse and Fedora
fixes#1208
Squashed commit of the following:
commit c208bc30b7747b3743212483b3dd7e3f90819f49
Merge: 97bea942633372
Author: Konrad Borowski <glitchmr@myopera.com>
Date: Fri Jul 19 09:56:12 2013 +0200
Merge branch 'command-not-found' of git://github.com/GlitchMr/fish-shell into command-not-found
commit 26333721b9
Author: Konrad Borowski <glitchmr@myopera.com>
Date: Fri Jul 19 09:55:13 2013 +0200
Fix command_not_found when not found
commit db34460bb5
Author: Konrad Borowski <glitchmr@myopera.com>
Date: Wed Jul 17 13:41:57 2013 +0200
Avoid showing standard command not found message when possible
In bash, command-not-found handler causes the standard messages to
not appear. Because of events model in fish, it isn't really an
option, so I moved the standard command not found message to
fish function. This way, the messages aren't repeated, and the
standard command not found message appears only when handler
couldn't be found.
fish_pager_color_secondary to set background of every second completion
line. It simplifies finding the options corresponding to given
description. Default color is 151515.
__fish_config_interactive.fish uses the presence of __fish_init_1_50_0
to decide whether it should perform a one-time initialization of
universal variables. Unfortunately, it sets the variable
__fish_init_1_23_0. Fix this to set __fish_init_1_50_0 instead.