mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +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"
|
function fish_config --description "Launch fish's web based configuration"
|
||||||
# Support passing an initial tab like "colors" or "functions"
|
set -lx __fish_bin_dir $__fish_bin_dir
|
||||||
set -l initial_tab
|
if command -sq python3
|
||||||
if count $argv >/dev/null
|
python3 "$__fish_datadir/tools/web_config/webconfig.py" $argv
|
||||||
set initial_tab $argv[1]
|
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
|
end
|
||||||
set -x __fish_bin_dir $__fish_bin_dir
|
|
||||||
eval (string escape $__fish_datadir/tools/web_config/webconfig.py) $initial_tab
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue