Elisp python equivalent shlex.split?

I need to parse the command line in elisp, something like:

(shlex-split "command \"Some file with spaces\" someother\ quote")
;;That gives ("command" "Some file with spaces" "someother quote")

How can I accomplish this in a simple way?

+3
source share
1 answer

(split-string-and-unquote "command \" Some files with spaces \ someother \ quote ")

+4
source

All Articles