aboutsummaryrefslogtreecommitdiffstats
path: root/completions/bash
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2019-01-13 21:29:12 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-01-13 21:40:26 -0500
commit3fca8b8d22ee51a934fa3b8704c5aee8a5de7689 (patch)
treeabdec67233e7453274f6561c4a207a6d7d6c6d39 /completions/bash
parentMerge pull request #3144 from emersion/cmd-xwayland (diff)
downloadsway-3fca8b8d22ee51a934fa3b8704c5aee8a5de7689.tar.gz
sway-3fca8b8d22ee51a934fa3b8704c5aee8a5de7689.tar.zst
sway-3fca8b8d22ee51a934fa3b8704c5aee8a5de7689.zip
Split swaylock into separate project
Diffstat (limited to 'completions/bash')
-rw-r--r--completions/bash/swaylock66
1 files changed, 0 insertions, 66 deletions
diff --git a/completions/bash/swaylock b/completions/bash/swaylock
deleted file mode 100644
index 33925480..00000000
--- a/completions/bash/swaylock
+++ /dev/null
@@ -1,66 +0,0 @@
1# swaylock(1) completion
2
3_swaylock()
4{
5 local cur prev
6 _get_comp_words_by_ref -n : cur prev
7
8 short=(
9 -h
10 -c
11 -s
12 -t
13 -v
14 -i
15 -u
16 -f
17 )
18
19 long=(
20 --help
21 --color
22 --scaling
23 --tiling
24 --version
25 --image
26 --no-unlock-indicator
27 --daemonize
28 )
29
30 scaling=(
31 'stretch'
32 'fill'
33 'fit'
34 'center'
35 'tile'
36 )
37
38 case $prev in
39 -c|--color)
40 return
41 ;;
42 --scaling)
43 COMPREPLY=($(compgen -W "${scaling[*]}" -- "$cur"))
44 return
45 ;;
46 -i|--image)
47 if grep -q : <<< "$cur"; then
48 output="${cur%%:*}:"
49 cur="${cur#*:}"
50 else
51 output=
52 fi
53 COMPREPLY=($(compgen -f -- "$cur"))
54 return
55 ;;
56 esac
57
58 if [[ $cur == --* ]]; then
59 COMPREPLY=($(compgen -W "${long[*]}" -- "$cur"))
60 else
61 COMPREPLY=($(compgen -W "${short[*]}" -- "$cur"))
62 COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur"))
63 fi
64
65} &&
66complete -F _swaylock swaylock