Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

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

Open
haroldcarr opened this issue Nov 1, 2021 · 0 comments
Open

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

haroldcarr opened this issue Nov 1, 2021 · 0 comments

Comments

@haroldcarr
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant