aboutsummaryrefslogblamecommitdiff
path: root/.local/share/bash-completion/dotnet
blob: 8cd3751a2550657a7043435fa3563f9f93fccceb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                                      
#!/usr/bin/env bash

# bash parameter completion for the dotnet CLI

function _dotnet_bash_complete()
{
  local cur="${COMP_WORDS[COMP_CWORD]}" IFS=$'\n'
  local candidates

  read -d '' -ra candidates < <(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)

  read -d '' -ra COMPREPLY < <(compgen -W "${candidates[*]:-}" -- "$cur")
}


complete -f -F _dotnet_bash_complete dotnet