diff options
author | 2015-09-29 17:08:24 +0200 | |
---|---|---|
committer | 2015-10-04 15:41:20 +0200 | |
commit | 45bf843b03c4c2bdf5946233858a529554152c8b (patch) | |
tree | eff1a2b3f56d3bcb90a5f3ac1f23acaf76799079 /share/completions/python.fish | |
parent | 610a5926a8c559489ce349e7129b86c478349658 (diff) |
Move python comp away from eval and sed
I have no clue why this used eval.
Diffstat (limited to 'share/completions/python.fish')
-rw-r--r-- | share/completions/python.fish | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/completions/python.fish b/share/completions/python.fish index 64ab4d9b..d36aa923 100644 --- a/share/completions/python.fish +++ b/share/completions/python.fish @@ -17,7 +17,7 @@ complete -c python -s x -d 'Skip first line of source, allowing use of non-Unix complete -c python -a "(__fish_complete_suffix .py)" complete -c python -a '-' -d 'Read program from stdin' -switch (eval python -V 2>&1 | head -n1 | sed 's/^.*[[:space:]]\([23]\)\..*/\1/') +switch (python -V 2>&1 | string replace -r '^.*\s([23])..*' '$1')[1] case 2 complete -c python -s 3 -d 'Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix' complete -c python -s t --description "Warn on mixed tabs and spaces" |