code: def install(self) -> None:
      # Record the old rule for uninstalling
      script = f"export _HYDRA_OLD_COMP=$(complete -p {self._get_exec()} 2> /dev/null)\n"
      script += """hydra_bash_completion()
  {
      words=($COMP_LINE)
      if [ "${words[0]}" == "python" ]; then
          if (( ${#words[@]} < 2 )); then
              return
          fi
          file_path=$(pwd)/${words[1]}
          if [ ! -f "$file_path" ]; then
              return
          fi
          grep "@hydra.main" $file_path -q
          helper="${words[0]} ${words[1]}"
      else
          helper="${words[0]}"
          true
      fi
  
      EXECUTABLE=($(command -v $helper))
      if [ "$HYDRA_COMP_DEBUG" == "1" ]; then
          printf "EXECUTABLE_FIRST='${EXECUTABLE[0]}'\\n"
      fi
      if ! [ -x "${EXECUTABLE[0]}" ]; then
          false
      fi
  
      if [ $? == 0 ]; then
          choices=$( COMP_POINT=$COMP_POINT COMP_LINE=$COMP_LINE $helper -sc query=bash)
          word=${words[$COMP_CWORD]}
  
          if [ "$HYDRA_COMP_DEBUG" == "1" ]; then
              printf "\\n"
              printf "COMP_LINE='$COMP_LINE'\\n"
              printf "COMP_POINT='$COMP_POINT'\\n"
              printf "Word='$word'\\n"
              printf "Output suggestions:\\n"
              printf "\\t%s\\n" ${choices[@]}
          fi
          COMPREPLY=($( compgen -o nospace -o default -W "$choices" -- "$word" ));
      fi
  }
  
  COMP_WORDBREAKS=${COMP_WORDBREAKS//=}
  COMP_WORDBREAKS=$COMP_WORDBREAKS complete -o nospace -o default -F hydra_bash_completion """
      print(script + self._get_exec())
  
file_path: hydra/hydra/_internal/core_plugins/bash_completion.py
imports: import logging
  import os
  import sys
  from typing import Optional
  from hydra.plugins.completion_plugin import CompletionPlugin
label_desc: Use image node_id 1 for calling the BashCompletion obj's underlying member method code with example usage: obj.install() without return types