Use complete --keep-order with __fish_complete_suffix to prioritize files with matching suffixes

Part of #7040
This commit is contained in:
Johannes Altmanninger
2020-12-13 08:27:21 +01:00
parent bae75c96d9
commit 4dae106911
66 changed files with 106 additions and 105 deletions

View File

@@ -16,7 +16,7 @@ complete -c python -o vv -d "Even more verbose mode"
complete -c python -s V -l version -d "Display version and exit"
complete -c python -s W -x -d "Warning control" -a "ignore default all module once error"
complete -c python -s x -d 'Skip first line of source, allowing use of non-Unix forms of #!cmd'
complete -c python -f -n __fish_is_first_token -a "(__fish_complete_suffix .py)"
complete -c python -f -n __fish_is_first_token -k -a "(__fish_complete_suffix .py)"
complete -c python -f -n __fish_is_first_token -a - -d 'Read program from stdin'
# Version-specific completions