aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_print_packages.fish12
-rw-r--r--share/functions/fish_default_key_bindings.fish2
-rw-r--r--share/functions/funcsave.fish10
3 files changed, 18 insertions, 6 deletions
diff --git a/share/functions/__fish_print_packages.fish b/share/functions/__fish_print_packages.fish
index 8dae87b9..1991bd6d 100644
--- a/share/functions/__fish_print_packages.fish
+++ b/share/functions/__fish_print_packages.fish
@@ -46,9 +46,17 @@ function __fish_print_packages
# This completes the package name from the portage tree.
# True for installing new packages. Function for printing
# installed on the system packages is in completions/emerge.fish
- if type -f emerge >/dev/null
- emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\ -f3 |cut -d/ -f2
+
+ # eix is MUCH faster than emerge so use it if it is available
+ if type -f eix > /dev/null
+ eix --only-names "^"(commandline -tc) | cut -d/ -f2
return
+ else
+ # FIXME? Seems to be broken
+ if type -f emerge >/dev/null
+ emerge -s \^(commandline -tc) |sgrep "^*" |cut -d\ -f3 |cut -d/ -f2
+ return
+ end
end
end
diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish
index f8e1edf4..a26387d4 100644
--- a/share/functions/fish_default_key_bindings.fish
+++ b/share/functions/fish_default_key_bindings.fish
@@ -68,6 +68,8 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
bind \e\x7f backward-kill-word
bind \eb backward-word
bind \ef forward-word
+ bind \e\[1\;5C forward-word
+ bind \e\[1\;5D backward-word
bind \ed forward-kill-word
bind -k ppage beginning-of-history
bind -k npage end-of-history
diff --git a/share/functions/funcsave.fish b/share/functions/funcsave.fish
index ff9cabb5..a1725ca9 100644
--- a/share/functions/funcsave.fish
+++ b/share/functions/funcsave.fish
@@ -4,11 +4,13 @@ function funcsave --description "Save the current definition of all specified fu
if count $argv >/dev/null
switch $argv[1]
case -h --h --he --hel --help
- __fish_print_help save_function
+ __fish_print_help funcsave
return 0
end
else
- __fish_print_help save_function
+ printf (_ "%s: Expected function name\n") funcsave
+ __fish_print_help funcsave
+ return 1
end
set -l res 0
@@ -21,7 +23,7 @@ function funcsave --description "Save the current definition of all specified fu
for i in $configdir $configdir/fish $configdir/fish/functions
if not test -d $i
if not command mkdir $i >/dev/null
- printf (_ "%s: Could not create configuration directory\n") save_function
+ printf (_ "%s: Could not create configuration directory\n") funcsave
return 1
end
end
@@ -32,7 +34,7 @@ function funcsave --description "Save the current definition of all specified fu
functions $i > $configdir/fish/functions/$i.fish
functions -e $i
else
- printf (_ "%s: Unknown function '%s'\n") save_function $i
+ printf (_ "%s: Unknown function '%s'\n") funcsave $i
set res 1
end
end