mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
fish_config: Pick a python
Also remove a use of `eval` and `string escape`. Fixes #3970.
This commit is contained in:
parent
7ef2d5e86f
commit
e410d47565
1 changed files with 7 additions and 6 deletions
|
@ -1,9 +1,10 @@
|
|||
function fish_config --description "Launch fish's web based configuration"
|
||||
# Support passing an initial tab like "colors" or "functions"
|
||||
set -l initial_tab
|
||||
if count $argv >/dev/null
|
||||
set initial_tab $argv[1]
|
||||
set -lx __fish_bin_dir $__fish_bin_dir
|
||||
if command -sq python3
|
||||
python3 "$__fish_datadir/tools/web_config/webconfig.py" $argv
|
||||
else if command -sq python2
|
||||
python2 "$__fish_datadir/tools/web_config/webconfig.py" $argv
|
||||
else if command -sq python
|
||||
python "$__fish_datadir/tools/web_config/webconfig.py" $argv
|
||||
end
|
||||
set -x __fish_bin_dir $__fish_bin_dir
|
||||
eval (string escape $__fish_datadir/tools/web_config/webconfig.py) $initial_tab
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue