Skip to content

Commit

Permalink
fish might use $version instead $FISH_VERSION
Browse files Browse the repository at this point in the history
Starting with fish 2.7 uppercase var are lowercases, see

  fish-shell/fish-shell#4414

or in case of $FISH_VERSION renamed, see also

  fish-shell/fish-shell@fb8ae04
  • Loading branch information
oschrenk committed Oct 20, 2017
1 parent 3af63bc commit bb07285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell/key-bindings.fish
Expand Up @@ -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 $FISH_VERSION $version | cut -f1 -d.)
set -l FISH_MINOR (echo $FISH_VERSION $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
Expand Down

2 comments on commit bb07285

@floam
Copy link

@floam floam commented on bb07285 Oct 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every version of fish, even prior to this change, has supported $version - you do not need to check both.

@oschrenk
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, even better!

Please sign in to comment.