Skip to content

Commit

Permalink
fix copy&paste error in readme
Browse files Browse the repository at this point in the history
- also add oil to completion command
  • Loading branch information
rsteube committed May 20, 2021
1 parent c4132a9 commit a73c3f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a73c3f9

Please sign in to comment.