kislyuk/argcomplete

How can I suppress unnecessary variables outside of my program?

Opened this issue · 1 comments

In zsh, when I press TAB I see all defined variables. Is it possible to suppress all those unnecessary variables?

$ program    <TAB >    # works
about          --  metadata
console        -- Load the console

When I have a sub-argument I face with following output, example view :

$ program run    <TAB>   # shows many variables along with the defined arguments
ALTERNATE_EDITOR             BAT_PAGER
_ARGCOMPLETE                 COMP_POINT
_ARGCOMPLETE_SUPPRESS_SPACE  _ARGCOMPLETE_SHELL
BROWNIE_LIB                  CLICOLOR
COLORTERM                    _P9K_TTY
COMP_LINE                    IFS
DBUS_SESSION_BUS_ADDRESS     DISPLAY
DEFAULT_USER                 ZSH
EDITOR                       EBB
FZF_DEFAULT_COMMAND          DIRHISTORY_SIZE
FZF_DEFAULT_OPTS             FZF_CTRL_R_OPTS
GO111MODULE                  GOPATH
GPG_TTY                      GOROOT
GROFF_NO_SGR                 HISTCONTROL
HOST                         HOME
IGNOREEOF                    LANG
LANGUAGE                     LC_ALL
LC_COLLATE                   LC_CTYPE
LC_TERMINAL                  LC_MESSAGES
LC_TERMINAL_VERSION          LESS
LESS_TERMCAP_md              LESS_TERMCAP_mb
LESS_TERMCAP_se              LESS_TERMCAP_me
LESS_TERMCAP_ue              LESS_TERMCAP_so
LESS_TERMCAP_us              LOGNAME
LS_COLORS                    LSCOLORS
LSP_USE_PLISTS               MANPAGER
MOTD_SHOWN                   OLDPWD
NVM_CD_FLAGS                 NVM_DIR
NVM_INC                      NVM_BIN
P9K_SSH                      PS1
P9K_TTY                      _
PAGER                        PATH
PROMPT_COMMAND               PWD
PYTHONPYCACHEPREFIX          PYTHONBREAKPOINT
SHLVL                        SHELL
SSH_AUTH_SOCK                SQUEUE_FORMAT
SSH_CONNECTION               SSH_CLIENT
SSH_TTY                      TERM
TERM_PROGRAM_VERSION         TERM_PROGRAM
TMUX_PANE                    TMUX
TMUX_PLUGIN_MANAGER_PATH     USER
VIRTUAL_ENV                  COLUMNS
WORKON_HOME                  XAUTHORITY
XDG_SESSION_CLASS            XDG_RUNTIME_DIR
XDG_SESSION_TYPE             XDG_SESSION_ID      -- Authenticate orcid

This was potentially fixed in #463 or is related to #445. Can you give more information about how you have installed completion (either register-python-argcomplete or activate-global-python-argcomplete)? Can you also test against #466 please?