diff --git a/README.md b/README.md index 63c03d54..b210a221 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ eval (lab completion|slurp) lab completion | source # oil -source <(gh _carapace) +source <(lab completion) # powershell (~/.config/powershell/Microsoft.PowerShell_profile.ps1) Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete diff --git a/cmd/completion.go b/cmd/completion.go index 1f78fc44..00c5f165 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -11,17 +11,18 @@ import ( // completionCmd represents the completion command var completionCmd = &cobra.Command{ Use: "completion [shell]", - Short: "Generates the shell autocompletion [bash, elvish, fish, powershell, xonsh, zsh]", - Long: `Generates the shell autocompletion [bash, elvish, fish, powershell, xonsh, zsh] + Short: "Generates the shell autocompletion [bash, elvish, fish, oil, powershell, xonsh, zsh]", + Long: `Generates the shell autocompletion [bash, elvish, fish, oil, powershell, xonsh, zsh] Scripts can be directly sourced (though using pre-generated versions is recommended to avoid shell startup delay): bash : source <(lab completion) elvish : eval(lab completion|slurp) - fish : lab completion fish | source + fish : lab completion | source + oil : source <(lab completion) powershell : lab completion | Out-String | Invoke-Expression xonsh : exec($(lab completion)) zsh : source <(lab completion)`, - ValidArgs: []string{"bash", "elvish", "fish", "powershell", "xonsh", "zsh"}, + ValidArgs: []string{"bash", "elvish", "fish", "oil", "powershell", "xonsh", "zsh"}, Run: func(cmd *cobra.Command, args []string) { shell := "" if len(args) > 0 {