fish-shell/share
Ben Liblit 5c4acc8ee1 Notify vte-based terminals when a command completes.
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.
2015-05-28 03:10:56 -05:00
..
completions Revert "Add completions for pass" 2015-05-25 12:02:05 +08:00
functions Notify vte-based terminals when a command completes. 2015-05-28 03:10:56 -05:00
tools Make fish_config work correctly when IPv6 is disabled in the kernel 2015-05-17 19:18:27 -07:00
config.fish Revert "Source files /etc/profile.d/*.fish at startup" 2015-04-14 10:08:40 -07:00