ssh-el icon indicating copy to clipboard operation
ssh-el copied to clipboard

ssh-parse-words can't handle "-o 'ConnectTimeout 1'"

Open haroldcarr opened this issue 3 years ago • 0 comments

The following parses correctly:

(ssh-parse-words "192.168.1.6 -l me -o 'RemoteCommand hostname'")
=> ("192.168.1.6" "-l" "me" "-o" "RemoteCommand hostname")

Here is the problem:

(ssh-parse-words "192.168.1.6 -l me -o 'ConnectTimeout 1'")
("192.168.1.6" "-l" "me" "-o" "'ConnectTimeout" "1'")

If I change the 1 to one it parses correctly (but, of course, this will not be accepted by ssh itself):

(ssh-parse-words "192.168.1.6 -l me -o 'ConnectTimeout one'")
("192.168.1.6" "-l" "me" "-o" "ConnectTimeout one")

I guess the regular expression in ssh-parse-words needs to be adjusted, but regexs are a black art to me.

haroldcarr avatar Nov 01 '21 18:11 haroldcarr