Skip to content

Commit

Permalink
chore: add dotnet completion
Browse files Browse the repository at this point in the history
  • Loading branch information
BusHero committed Sep 10, 2023
1 parent e9c27b9 commit 85abde8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions features/src/dotnet/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@
apk update
apk upgrade
apk add dotnet7-sdk

echo '
# bash parameter completion for the dotnet CLI
function _dotnet_bash_complete()
{
local cur="${COMP_WORDS[COMP_CWORD]}" IFS=$'\n' # On Windows you may need to use use IFS=$'\r\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
' >> $_REMOTE_USER_HOME/.bashrc

0 comments on commit 85abde8

Please sign in to comment.