You are not logged in.

#1 2026-03-12 16:58:30

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 340

aws_completer does nothing: is it Arch or AWS?

The aws_completer tool thayt comes with extra/aws-cli-v2 (mine is v2.33.22-1) does nothing.
It's supposed to output something to implement shell auto-completion.
It outputs nothing, thus the question so I can file a bug.

TIA


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#2 2026-03-12 17:01:37

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 340

Re: aws_completer does nothing: is it Arch or AWS?

The "program" is Python code, suspiciously short.

#!/usr/bin/python
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at

#     http://aws.amazon.com/apache2.0/

# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import os

if os.environ.get('LC_CTYPE', '') == 'UTF-8':
    os.environ['LC_CTYPE'] = 'en_US.UTF-8'
from awscli.autocomplete.main import autocomplete


def main():
    # bash exports COMP_LINE and COMP_POINT, tcsh COMMAND_LINE only
    command_line = (
        os.environ.get('COMP_LINE') or os.environ.get('COMMAND_LINE') or ''
    )
    command_index = int(os.environ.get('COMP_POINT') or len(command_line))

    try:
        autocomplete(command_line, command_index)
    except KeyboardInterrupt:
        # If the user hits Ctrl+C, we don't want to print
        # a traceback to the user.
        pass


if __name__ == '__main__':
    main()

Adding a couple of print command like these:

    print(command_line)
    print(command_index)

reveals that the command_line string is empty ('') while command_index is 0.
My question still stands.

Last edited by 0BADC0DE (2026-03-12 17:07:56)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#3 2026-03-12 20:11:09

teckk
Member
Registered: 2013-02-21
Posts: 575

Re: aws_completer does nothing: is it Arch or AWS?

Offline

#4 2026-03-12 22:20:17

0BADC0DE
Member
From: Regnum Utriusque Siciliae
Registered: 2018-02-21
Posts: 340

Re: aws_completer does nothing: is it Arch or AWS?

That tool is/was supposed to generate bash autocompletion stuff.

Last edited by 0BADC0DE (2026-03-13 13:38:58)


Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.

Offline

#5 2026-03-13 20:39:35

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,845

Re: aws_completer does nothing: is it Arch or AWS?

You have to perform some steps to make it work.

for bash it would be this command :

$ complete -C '/usr/bin/aws_completer' aws

(taken from https://docs.aws.amazon.com/cli/latest/ … etion.html )


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB