Escape filenames the same way Bash does it

后端 未结 6 1407
攒了一身酷
攒了一身酷 2020-11-30 06:14

When I use the \"tab\" key in bash (when you have started to type the filename and you want it to complete), bash escapes the filename correctly, a

6条回答
  •  庸人自扰
    2020-11-30 06:19

    I may be a little late to the party but what worked for me is:

    ls  --quoting-style=shell-escape
    

    This way it also escapes characters like ! or '.

提交回复
热议问题