From 5004ae345784811d14d6235df40244b85239b9b4 Mon Sep 17 00:00:00 2001 From: Oliver Schrenk Date: Wed, 27 Jun 2018 12:02:16 +0200 Subject: [PATCH] [fish] Use $version instead of $FISH_VERSION (#1100) $FISH_VERSION is dropped in 2.7, but every version has $version - https://github.com/fish-shell/fish-shell/issues/4414 - https://github.com/fish-shell/fish-shell/commit/fb8ae04f80c3a129f789e7b718464d014508315f Comment from @faho in #1316: Unfortunately, $FISH_VERSION was only ever a thing from fish 2.0 to fish 2.7.1. All fish versions from the very beginning though used a variable called simply "$version" to store their version, so that is the one that should be used. --- shell/key-bindings.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index 97a3ec55..57704f72 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -40,8 +40,8 @@ function fzf_key_bindings begin set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" - set -l FISH_MAJOR (echo $FISH_VERSION | cut -f1 -d.) - set -l FISH_MINOR (echo $FISH_VERSION | cut -f2 -d.) + set -l FISH_MAJOR (echo $version | cut -f1 -d.) + set -l FISH_MINOR (echo $version | cut -f2 -d.) # history's -z flag is needed for multi-line support. # history's -z flag was added in fish 2.4.0, so don't use it for versions