Skip to content

Commit adbf8ee

Browse files
committed
refactor: __ltrim_colon_completions -> _comp_ltrim_colon_completions
1 parent 36e3565 commit adbf8ee

File tree

17 files changed

+27
-26
lines changed

17 files changed

+27
-26
lines changed

bash_completion

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ _comp_get_words()
691691
# @param $1 current word to complete (cur)
692692
# @modifies global array $COMPREPLY
693693
#
694-
__ltrim_colon_completions()
694+
_comp_ltrim_colon_completions()
695695
{
696696
local i=${#COMPREPLY[*]}
697697
((i == 0)) && return 0
@@ -703,7 +703,7 @@ __ltrim_colon_completions()
703703
COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"}
704704
done
705705
fi
706-
} # __ltrim_colon_completions()
706+
} # _comp_ltrim_colon_completions()
707707

708708
# This function quotes the argument in a way so that readline dequoting
709709
# results in the original argument. This is necessary for at least
@@ -842,12 +842,12 @@ _variables()
842842
if [[ ${BASH_REMATCH[3]} == [@*] ]]; then
843843
COMPREPLY+=("${BASH_REMATCH[1]}${BASH_REMATCH[2]}[${BASH_REMATCH[3]}]}")
844844
fi
845-
__ltrim_colon_completions "$cur" # array indexes may have colons
845+
_comp_ltrim_colon_completions "$cur" # array indexes may have colons
846846
return 0
847847
elif [[ $cur =~ ^\$\{[#!]?[A-Za-z0-9_]*\[.*\]$ ]]; then
848848
# Complete ${array[idx] with ${array[idx]}
849849
COMPREPLY+=("$cur}")
850-
__ltrim_colon_completions "$cur"
850+
_comp_ltrim_colon_completions "$cur"
851851
return 0
852852
fi
853853
return 1
@@ -907,7 +907,7 @@ _comp_delimited()
907907
COMPREPLY[i]="$prefix${COMPREPLY[i]}"
908908
done
909909

910-
[[ $delimiter != : ]] || __ltrim_colon_completions "$cur"
910+
[[ $delimiter != : ]] || _comp_ltrim_colon_completions "$cur"
911911
}
912912

913913
# Complete assignment of various known environment variables.
@@ -1246,7 +1246,7 @@ _mac_addresses()
12461246

12471247
((${#COMPREPLY[@]})) &&
12481248
_comp_compgen COMPREPLY -W '"${COMPREPLY[@]}"' -- "$cur"
1249-
__ltrim_colon_completions "$cur"
1249+
_comp_ltrim_colon_completions "$cur"
12501250
}
12511251

12521252
# This function completes on configured network interfaces
@@ -2157,7 +2157,7 @@ _known_hosts_real()
21572157
fi
21582158
fi
21592159

2160-
__ltrim_colon_completions "$prefix$cur"
2160+
_comp_ltrim_colon_completions "$prefix$cur"
21612161

21622162
} # _known_hosts_real()
21632163
complete -F _known_hosts traceroute traceroute6 \

bash_completion.d/000_bash_completion_compat.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _comp_deprecate_func __get_cword_at_cursor_by_ref _comp__get_cword_at_cursor
1414
_comp_deprecate_func _get_comp_words_by_ref _comp_get_words
1515
_comp_deprecate_func _longopt _comp_longopt
1616
_comp_deprecate_func _split_longopt _comp__split_longopt
17+
_comp_deprecate_func __ltrim_colon_completions _comp_ltrim_colon_completions
1718

1819
# Backwards compatibility for compat completions that use have().
1920
# @deprecated should no longer be used; generally not needed with dynamically

completions/apt-get

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ _comp_cmd_apt_get()
5252
done
5353
)" \
5454
-- "$cur"))
55-
__ltrim_colon_completions "$cur"
55+
_comp_ltrim_colon_completions "$cur"
5656
return
5757
fi
5858
;;&

completions/chromium-browser

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _comp_cmd_chromium_browser()
1919
local prefix="${cur%%://*}://"
2020
_known_hosts_real -- "${cur#*://}"
2121
COMPREPLY=("${COMPREPLY[@]/#/$prefix}")
22-
__ltrim_colon_completions "$cur"
22+
_comp_ltrim_colon_completions "$cur"
2323
;;
2424
*)
2525
compopt -o nospace

completions/cvs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ _comp_xfunc_cvs_roots()
4343
[[ -r CVS/Root ]] && mapfile -tO ${#cvsroots[@]} cvsroots <CVS/Root
4444
((${#cvsroots[@]})) &&
4545
COMPREPLY=($(compgen -W '"${cvsroots[@]}"' -- "$cur"))
46-
__ltrim_colon_completions "$cur"
46+
_comp_ltrim_colon_completions "$cur"
4747
}
4848

4949
_comp_deprecate_func _cvs_roots _comp_xfunc_cvs_roots

completions/gphoto2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ _comp_cmd_gphoto2()
2525
--port)
2626
COMPREPLY=($(compgen -W "$("$1" --list-ports 2>/dev/null |
2727
awk 'NR>3 { print $1 }')" -- "$cur"))
28-
__ltrim_colon_completions "$cur"
28+
_comp_ltrim_colon_completions "$cur"
2929
return
3030
;;
3131
--camera)

completions/iperf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _comp_cmd_iperf()
3737
--bind | -${noargopts}B)
3838
_available_interfaces -a
3939
_ip_addresses -a
40-
__ltrim_colon_completions "$cur"
40+
_comp_ltrim_colon_completions "$cur"
4141
return
4242
;;
4343
--bind-dev)

completions/java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ _comp_cmd_java()
239239

240240
[[ ${COMPREPLY-} == -*[:=] ]] && compopt -o nospace
241241

242-
__ltrim_colon_completions "$cur"
242+
_comp_ltrim_colon_completions "$cur"
243243
} &&
244244
complete -F _comp_cmd_java java
245245

@@ -330,7 +330,7 @@ _comp_cmd_javac()
330330

331331
[[ ${COMPREPLY-} == -*[:=] ]] && compopt -o nospace
332332

333-
__ltrim_colon_completions "$cur"
333+
_comp_ltrim_colon_completions "$cur"
334334
} &&
335335
complete -F _comp_cmd_javac javac
336336

completions/links

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ _comp_cmd_links()
4747
;;
4848
-bind-address-ipv6)
4949
_ip_addresses -6
50-
__ltrim_colon_completions "$cur"
50+
_comp_ltrim_colon_completions "$cur"
5151
return
5252
;;
5353
-async-dns | -download-utime | -aggressive-cache | -only-proxies | \
@@ -89,7 +89,7 @@ _comp_cmd_links()
8989
for dir in .links .links2; do
9090
if [[ -r ~/$dir/links.his ]]; then
9191
COMPREPLY+=($(compgen -W '$(cat ~/$dir/links.his)' -- "$cur"))
92-
__ltrim_colon_completions "$cur"
92+
_comp_ltrim_colon_completions "$cur"
9393
fi
9494
done
9595
_filedir '@(htm|html)'

completions/man

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ _comp_cmd_man()
105105
done
106106
fi
107107

108-
__ltrim_colon_completions "$cur"
108+
_comp_ltrim_colon_completions "$cur"
109109
} &&
110110
complete -F _comp_cmd_man man apropos whatis
111111

0 commit comments

Comments
 (0)