Skip to content

Commit 912eef8

Browse files
committed
refactor(xgamma): use _comp_compgen -P for -display:*.*
1 parent 1e08205 commit 912eef8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

completions/xgamma

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ _comp_cmd_xgamma()
3232
# local screen numbers
3333
local t screens=$(xrandr --query 2>/dev/null | command sed -ne \
3434
'/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null)
35-
t="${cur#:}"
36-
_comp_compgen -c "${cur##*.}" -- -P "${t%.*}." -W '$screens'
35+
cur="${cur#:}"
36+
_comp_compgen -P "${cur%.*}." -- -W '$screens'
3737
elif [[ $cur != *:* ]]; then
3838
# complete hostnames
3939
_comp_compgen_known_hosts -c -- "$cur"

0 commit comments

Comments
 (0)