a few small code cleanups
This commit is contained in:
parent
5f227c1c45
commit
6b66db7436
4 changed files with 10 additions and 10 deletions
|
@ -1,14 +1,13 @@
|
|||
#!/bin/bash
|
||||
# Parameter completion for the dotnet CLI
|
||||
# bash parameter completion for the dotnet CLI
|
||||
|
||||
_dotnet_bash_complete()
|
||||
{
|
||||
local word=${COMP_WORDS[COMP_CWORD]}
|
||||
local dotnetPath=${COMP_WORDS[1]}
|
||||
|
||||
local completions=("$(./bin/Debug/netcoreapp1.0/osx.10.11-x64/publish/dotnet complete --position ${COMP_POINT} "${COMP_LINE}")")
|
||||
local completions=("$(dotnet complete --position ${COMP_POINT} "${COMP_LINE}")")
|
||||
|
||||
# https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html
|
||||
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# PowerShell parameter completion shim for the dotnet CLI
|
||||
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
|
||||
param($commandName, $wordToComplete, $cursorPosition)
|
||||
C:\dev\github\cli\artifacts\win10-x64\stage2\dotnet.exe complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
|
||||
dotnet.exe complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
|
||||
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
# Parameter completion for the dotnet CLI
|
||||
# zsh parameter completion for the dotnet CLI
|
||||
|
||||
_dotnet_zsh_complete()
|
||||
{
|
||||
local dotnetPath=$words[1]
|
||||
|
||||
local completions=("$(./bin/Debug/netcoreapp1.0/osx.10.11-x64/publish/dotnet complete "$words")")
|
||||
local completions=("$(dotnet complete "$words")")
|
||||
|
||||
reply=( "${(ps:\n:)completions}" )
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue