mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 03:01:15 -03:00
fish_update_completions: use status get-file instead of temp files
This helps the next commit.
This commit is contained in:
@@ -5,25 +5,19 @@ function fish_update_completions --description "Update man-page based completion
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish_update_completions -V python
|
||||
set -l user_args $argv[..-2]
|
||||
set -l tools $argv[-1]
|
||||
set -l update_args \
|
||||
# Don't write .pyc files.
|
||||
-B \
|
||||
$tools/create_manpage_completions.py \
|
||||
# Use the manpath
|
||||
--manpath \
|
||||
# Clean up old completions
|
||||
--cleanup-in $__fish_user_data_dir/generated_completions \
|
||||
--cleanup-in $__fish_cache_dir/generated_completions \
|
||||
# Display progress
|
||||
--progress \
|
||||
$user_args
|
||||
set -l update_args \
|
||||
# Don't write .pyc files.
|
||||
-B \
|
||||
$tools/create_manpage_completions.py \
|
||||
# Use the manpath
|
||||
--manpath \
|
||||
# Clean up old completions
|
||||
--cleanup-in $__fish_user_data_dir/generated_completions \
|
||||
--cleanup-in $__fish_cache_dir/generated_completions \
|
||||
# Display progress
|
||||
--progress \
|
||||
$argv
|
||||
|
||||
__fish_data_with_file tools/create_manpage_completions.py cat |
|
||||
$python $update_args
|
||||
end
|
||||
__fish_data_with_directory tools \
|
||||
'create_manpage_completions\.py' \
|
||||
__fish_update_completions $argv
|
||||
__fish_with_status functions --erase __fish_update_completions
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user