code: def install_completion(
          shell: arg(choices=('bash', 'fish'), help='Shell to install completion for'),
          to: arg(help='~/.bashrc.d/runcommands.rc or ~/.config/fish/runcommands.fish') = None,
          overwrite: 'Overwrite if exists' = False):
      
      if shell == 'bash':
          source = 'runcommands:completion/bash/runcommands.rc'
          to = to or '~/.bashrc.d'
      elif shell == 'fish':
          source = 'runcommands:completion/fish/runcommands.fish'
          to = to or '~/.config/fish/runcommands.fish'
  
      source = asset_path(source)
      destination = os.path.expanduser(to)
  
      if os.path.isdir(destination):
          destination = os.path.join(destination, os.path.basename(source))
  
      printer.info('Installing', shell, 'completion script to:\n    ', destination)
  
      if os.path.exists(destination):
          if overwrite:
              printer.info('Overwriting:\n    {destination}'.format_map(locals()))
          else:
              message = 'File exists. Overwrite?'.format_map(locals())
              overwrite = confirm(message, abort_on_unconfirmed=True)
  
      copy_file(source, destination)
      printer.info('Installed; remember to:\n    source {destination}'.format_map(locals()))
docs: Install command line completion script.
  
      Currently, bash and fish are supported. The corresponding script
      will be copied to an appropriate directory. If the script already
      exists at that location, it will be overwritten by default.