Skip to content

Commit 507caf5

Browse files
authored
completions: fix mixed tab/spaces indentation (#1473)
These templates use 4 spaces for indentation, but some lines used tabs. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c7a4421 commit 507caf5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bash_completions.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ __%[1]s_handle_reply()
238238
fi
239239
240240
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
241-
if declare -F __%[1]s_custom_func >/dev/null; then
242-
# try command name qualified custom func
243-
__%[1]s_custom_func
244-
else
245-
# otherwise fall back to unqualified for compatibility
246-
declare -F __custom_func >/dev/null && __custom_func
247-
fi
241+
if declare -F __%[1]s_custom_func >/dev/null; then
242+
# try command name qualified custom func
243+
__%[1]s_custom_func
244+
else
245+
# otherwise fall back to unqualified for compatibility
246+
declare -F __custom_func >/dev/null && __custom_func
247+
fi
248248
fi
249249
250250
# available in bash-completion >= 2, not always present on macOS
@@ -309,7 +309,7 @@ __%[1]s_handle_flag()
309309
310310
# skip the argument to a two word flag
311311
if [[ ${words[c]} != *"="* ]] && __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then
312-
__%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument"
312+
__%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument"
313313
c=$((c+1))
314314
# if we are looking for a flags value, don't show commands
315315
if [[ $c -eq $cword ]]; then

powershell_completions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
5050
if ($Command.Length -gt $CursorPosition) {
5151
$Command=$Command.Substring(0,$CursorPosition)
5252
}
53-
__%[1]s_debug "Truncated command: $Command"
53+
__%[1]s_debug "Truncated command: $Command"
5454
5555
$ShellCompDirectiveError=%[3]d
5656
$ShellCompDirectiveNoSpace=%[4]d
5757
$ShellCompDirectiveNoFileComp=%[5]d
5858
$ShellCompDirectiveFilterFileExt=%[6]d
5959
$ShellCompDirectiveFilterDirs=%[7]d
6060
61-
# Prepare the command to request completions for the program.
61+
# Prepare the command to request completions for the program.
6262
# Split the command at the first space to separate the program and arguments.
6363
$Program,$Arguments = $Command.Split(" ",2)
6464
$RequestComp="$Program %[2]s $Arguments"

zsh_completions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ _%[1]s()
250250
251251
# don't run the completion function when being source-ed or eval-ed
252252
if [ "$funcstack[1]" = "_%[1]s" ]; then
253-
_%[1]s
253+
_%[1]s
254254
fi
255255
`, name, compCmd,
256256
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,

0 commit comments

Comments
 (0)