Skip to content

Commit 4a2f0b4

Browse files
committed
refactor(_comp_compgen_services): simplify AWK code
1 parent e09a804 commit 4a2f0b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bash_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ _comp_compgen_services()
22052205
systemctl list-units --full --all ||
22062206
systemctl list-unit-files
22072207
} 2>/dev/null |
2208-
_comp_awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }')
2208+
_comp_awk 'sub(/\.service$/, "", $1) { print $1 }')
22092209
_comp_compgen -a split -l -- "$_generated"
22102210

22112211
if [[ -x /sbin/upstart-udev-bridge ]]; then

0 commit comments

Comments
 (0)