You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the bash documentation on how completion commands are added, the manual pages state the following for the -C argument of the bash builtin complete:
-C command command is executed in a subshell environment, and its output is used as the possible completions. Arguments are passed as with the -F option. -F function The shell function function is executed in the current shell environment. When the function is executed, the first argument ($1) is the name of the command whose arguments are being completed, the second argument ($2) is the word being com‐ pleted, and the third argument ($3) is the word preceding the word being completed on the current command line. When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable.
As I am trying to understand how aws_completer returns its suggestions, I tried to directly call it with some arguments:
sh-4.2# aws_completer aws s awssh-4.2# aws_completer aws s3 awssh-4.2#
I was expecting aws_completer to output the same suggestions that can be obtained after complete -C aws_completer aws is executed:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Looking at the bash documentation on how completion commands are added, the manual pages state the following for the
-C
argument of the bash builtincomplete
:As I am trying to understand how
aws_completer
returns its suggestions, I tried to directly call it with some arguments:I was expecting
aws_completer
to output the same suggestions that can be obtained aftercomplete -C aws_completer aws
is executed:But this does not seem to be the case.
Would anyone shed some light on this?
Beta Was this translation helpful? Give feedback.
All reactions