elisp中类似于Python shlex.split()的等效函数是什么?

4
我需要在elisp中解析命令行,类似于以下内容:
(shlex-split "command \"Some file with spaces\" someother\ quote")
;;That gives ("command" "Some file with spaces" "someother quote")

我该如何用简单的方法完成这个任务?
1个回答

5

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

将字符串拆分并取消引号:命令 "Some file with spaces" someother quote

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接