Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I exclude files in the users directory from the tab completion? #462

Closed
aidan-gallagher opened this issue Nov 23, 2023 · 2 comments
Closed

Comments

@aidan-gallagher
Copy link

aidan-gallagher commented Nov 23, 2023

For my tool there is no reason a user should pass a local file to the script. Therefore I don't want the files to appear in the tab completion.

Here is an example of the output I see. On the last command (tab completed) I don't want files to appear just the argparse arguments.

aidan@ag474u:~/Code/Per/dpkg-buildenv$ ls
built_packages  debian  developer-packages.txt  dpkg-buildenv  Jenkinsfile  README.md  tmp  workspaces




aidan@ag474u:~/Code/Per/dpkg-buildenv$ dpkg-buildenv/dpkg_buildenv.py --help
usage: dpkg_buildenv.py [-h] [-nc] [-s SOURCES] [-it] [-d] [command]

positional arguments:
  command               Command to execute in the container. [Docker run argument]

optional arguments:
  -h, --help            show this help message and exit
  -nc, --no-cache       Do not use cache when building the image. [Docker build argument]
  -s SOURCES, --sources SOURCES
                        Select a sources file stored at /etc/dpkg-buildenv/sources.list.d/<SOURCE>.list.
  -it, --interactive-tty
                        Open an interactive terminal to the container. [Docker run argument]
  -d, --delete-images   Delete all build environment images generated by this tool




aidan@ag474u:~/Code/Per/dpkg-buildenv$ dpkg-buildenv/dpkg_buildenv.py  (<----This is where I hit tab)
built_packages/         --delete-images         .git/                   --help                  Jenkinsfile             .pytest_cache/          --sources
-d                      developer-packages.txt  .gitignore              --interactive-tty       -nc                     README.md               tmp/
debian/                 dpkg-buildenv/          -h                      -it                     --no-cache              -s                      workspaces/
aidan@ag474u:~/Code/Per/dpkg-buildenv$ dpkg-buildenv/dpkg_buildenv.py 
@evanunderscore
Copy link
Collaborator

Are you using zsh? This may be a duplicate of #458.

@evanunderscore
Copy link
Collaborator

Fixed in #463.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants