class_docstr: Display shell script for enabling shell completion for DataLad.
  
  Output of this command should be "sourced" by the bash or zsh to enable
  shell completions provided by argcomplete.
  
  Example:
  
      $ source <(datalad shell-completion)
      $ datalad --<PRESS TAB to display available option>
docstr_tok: []
code: def __call__():
      """ """
      try:
          import argcomplete
      except Exception as exc:
          lgr.error(
              "argcomplete failed to import - completions unlikely to work."
              " Check if it is installed: %s",
              CapturedException(exc),
          )
      content = """\
  # Universal completion script for DataLad with the core autogenerated by
  # python-argcomplete and only slightly improved to work for ZSH if sourced under ZSH.
  #
  # Instead of just running this command and seeing this output, do
  #
  #    source <(datalad shell-completion)
  #
  # in your bash or zsh session.
  
  if [ "${ZSH_VERSION:-}" != "" ]; then
    autoload -U compinit && compinit
    autoload -U bashcompinit && bashcompinit
  fi
  
  _python_argcomplete() {
      local IFS=''
      COMPREPLY=( $(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1                   "$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) )
      if [[ $? != 0 ]]; then
          unset COMPREPLY
      fi
  }
  
  complete -o nospace -o default -F _python_argcomplete "datalad"
  """
      yield get_status_dict(
          action="shell_completion", status="ok", content=content
      )
  
file_path: datalad/datalad/interface/shell_completion.py
imports: from .base import Interface
  from datalad.interface.base import build_doc, eval_results
  from datalad.interface.results import get_status_dict
  from datalad.support.exceptions import CapturedException
  from logging import getLogger
label_desc: Use image node_id 1 for calling the ShellCompletion obj's underlying member method code with example usage: obj.__call__() without return types