-
-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package task | ||
|
||
import ( | ||
_ "embed" | ||
"fmt" | ||
) | ||
|
||
//go:embed completion/bash/task.bash | ||
var completionBash string | ||
|
||
//go:embed completion/fish/task.fish | ||
var completionFish string | ||
|
||
//go:embed completion/ps/task.ps1 | ||
var completionPowershell string | ||
|
||
//go:embed completion/zsh/_task | ||
var completionZsh string | ||
|
||
func Completion(completion string) (string, error) { | ||
// Get the file extension for the selected shell | ||
switch completion { | ||
case "bash": | ||
return completionBash, nil | ||
case "fish": | ||
return completionFish, nil | ||
case "powershell": | ||
return completionPowershell, nil | ||
case "zsh": | ||
return completionZsh, nil | ||
default: | ||
return "", fmt.Errorf("unknown shell: %s", completion) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
slug: /deprecations/completion-scripts/ | ||
--- | ||
|
||
# Completion Scripts | ||
|
||
:::warning | ||
|
||
This deprecation breaks the following functionality: | ||
|
||
- Any direct references to the completion scripts in the Task git repository | ||
|
||
::: | ||
|
||
Direct use of the completion scripts in the `completion/*` directory of the | ||
[github.com/go-task/task][task] Git repository is deprecated. Any shell | ||
configuration that directly refers to these scripts will potentially break in | ||
the future as the scripts may be moved or deleted entirely. Any configuration | ||
should be updated to use the [new method for generating shell | ||
completions][completions] instead. | ||
|
||
{/* prettier-ignore-start */} | ||
[completions]: ../installation.mdx#setup-completions | ||
[task]: https://github.com/go-task/task | ||
{/* prettier-ignore-end */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters