mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-21 18:06:29 +00:00
Update update_completions fish function for python argcomplete
When using register-python-argcomplete, the target command is the last arg rather than the first. This will pull that value instead.
This commit is contained in:
parent
3fe2b6dac0
commit
3360c13414
@ -14,6 +14,11 @@ function update_completions --description "Update completions for a command" --a
|
||||
set --local completion_dir "$XDG_CONFIG_HOME"
|
||||
end
|
||||
|
||||
if [ "$target_command" = "register-python-argcomplete" ]
|
||||
echo "Command was py $argv[-1]"
|
||||
set target_command $argv[-1]
|
||||
end
|
||||
|
||||
set --local completion_path "$completion_dir/$target_command.fish"
|
||||
eval $argv[1..] | tee "$completion_path" | source
|
||||
echo "Completions for $target_command generated, sourced, and stored in $completion_path for future shells" 1>&2
|
||||
|
Loading…
Reference in New Issue
Block a user