From 805a1776733061fabf65409bb30568a253762a3e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 20 Apr 2017 13:40:45 +0200 Subject: [PATCH] __fish_config_interactive: Prefer python3 Also includes the CHANGELOG. --- CHANGELOG.md | 1 + share/functions/__fish_config_interactive.fish | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1faeb14b0..5c082a675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Command substitutions now have access to the terminal, allowing tools like `fzf` to work in them (#1362, #3922). - `bg`s argument parsing has been reworked. It now fails for invalid arguments but allows non-existent jobs (#3909). - fish will now reset $USER if the uid is 0. This is to workaround some su implementations that pass along $USER when switching to root (#3944). +- Our python-using functions now pick any python version (preferring python3), making dependencies on a specific python version unnecessary (#3970). --- diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 65027b1d2..8fd544602 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -122,12 +122,12 @@ function __fish_config_interactive -d "Initializations that should be performed # Hence we'll call python directly. # c_m_p.py should work with any python version. set -l update_args -B $__fish_datadir/tools/create_manpage_completions.py --manpath --cleanup-in '~/.config/fish/completions' --cleanup-in '~/.config/fish/generated_completions' - if command -qs python - python $update_args >/dev/null ^/dev/null & + if command -qs python3 + python3 $update_args >/dev/null ^/dev/null & else if command -qs python2 python2 $update_args >/dev/null ^/dev/null & - else if command -qs python3 - python3 $update_args >/dev/null ^/dev/null & + else if command -qs python + python $update_args >/dev/null ^/dev/null & end end end