ssh-el
ssh-el copied to clipboard
ssh-parse-words can't handle "-o 'ConnectTimeout 1'"
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.