File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ _screen()
39
39
fi
40
40
41
41
case ${words[1]} in
42
+ /dev* )
43
+ if (( cword == 2 )) ; then
44
+ COMPREPLY=( $( compgen -W ' 110 300 600 1200 2400 4800 9600 \
45
+ 14400 19200 38400 57600 115200 128000 256000' -- " $cur " ) )
46
+ # TODO more, comma separated options
47
+ fi
48
+ return
49
+ ;;
42
50
//telnet)
43
51
(( cword == 2 )) && _known_hosts_real -- " $cur "
44
52
return
Original file line number Diff line number Diff line change @@ -38,3 +38,11 @@ def test_telnet_first_arg(self, completion):
38
38
@pytest .mark .complete ("screen //telnet foo " , env = dict (HOME = "$PWD/shared" ))
39
39
def test_telnet_other_args (self , completion ):
40
40
assert not completion
41
+
42
+ @pytest .mark .complete ("screen /dev/ttyUSB0 " )
43
+ def test_serial_2nd_arg (self , completion ):
44
+ assert "19200" in completion
45
+
46
+ @pytest .mark .complete ("screen /dev/ttyUSB0 9600 " )
47
+ def test_serial_3rdplus_arg (self , completion ):
48
+ assert not completion
You can’t perform that action at this time.
0 commit comments