Skip to content

Commit

Permalink
tcsh: escape descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Sep 11, 2021
1 parent f3f290e commit 36abbe1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- [Nushell](./development/shells/nushell.md)
- [Oil](./development/shells/oil.md)
- [Powershell](./development/shells/powershell.md)
- [Tcsh](./development/shells/tcsh.md)
- [Xonsh](./development/shells/xonsh.md)
- [Zsh](./development/shells/zsh.md)
- [Testing](./development/testing.md)
Expand Down
1 change: 1 addition & 0 deletions docs/src/development/additionalInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Additional information can be found at:
- Elvish: [using-and-writing-completions-in-elvish](https://zzamboni.org/post/using-and-writing-completions-in-elvish/) and [argument-completer](https://elv.sh/ref/edit.html#argument-completer)
- Fish: [fish-shell/share/functions](https://github.com/fish-shell/fish-shell/tree/master/share/functions) and [writing your own completions](https://fishshell.com/docs/current/#writing-your-own-completions)
- Powershell: [Dynamic Tab Completion](https://adamtheautomator.com/powershell-parameters-argumentcompleter/) and [Register-ArgumentCompleter](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/register-argumentcompleter)
- Tcsh: [complete built-in command for tcsh](https://www.ibm.com/docs/en/zos/2.3.0?topic=shell-complete-built-in-command-tcsh-list-completions)
- Xonsh: [Programmable Tab-Completion](https://xon.sh/tutorial_completers.html) and [RichCompletion(str)](https://github.com/xonsh/xonsh/blob/master/xonsh/completers/tools.py)
- Zsh: [zsh-completions-howto](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org#functions-for-performing-complex-completions-of-single-words) and [Completion-System](http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-System).
1 change: 1 addition & 0 deletions docs/src/development/shells/tcsh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tcsh
2 changes: 1 addition & 1 deletion internal/tcsh/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func ActionRawValues(currentWord string, nospace bool, values ...common.RawValue
} else {
if val.Description != "" {
// TODO seems actual value needs to be used or it won't be shown if the prefix doesn't match
vals[index] = fmt.Sprintf("%v_(%v)", quoter.Replace(sanitizer.Replace(val.Value)), strings.Replace(sanitizer.Replace(val.TrimmedDescription()), " ", "_", -1))
vals[index] = fmt.Sprintf("%v_(%v)", quoter.Replace(sanitizer.Replace(val.Value)), quoter.Replace(strings.Replace(sanitizer.Replace(val.TrimmedDescription()), " ", "_", -1)))
} else {
vals[index] = quoter.Replace(sanitizer.Replace(val.Value))
}
Expand Down

0 comments on commit 36abbe1

Please sign in to comment.