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

Use double quotes to prevent word splitting #26

Closed
wants to merge 1 commit into from
Closed

Use double quotes to prevent word splitting #26

wants to merge 1 commit into from

Conversation

goreliu
Copy link

@goreliu goreliu commented Aug 14, 2016

#25

@goreliu
Copy link
Author

goreliu commented Aug 15, 2016

Some problems ...

$ wcmd dir /a
 Volume in drive C is SYSTEM
 Volume Serial Number is 6E7D-F000

 Directory of c:\

File Not Found
$ wcmd 'dir /a'
 Volume in drive C is SYSTEM
 Volume Serial Number is 6E7D-F000

 Directory of c:\Users\goreliu

16/08/15  23:59    <DIR>          .
16/08/15  23:59    <DIR>          ..
...

@xilun
Copy link
Owner

xilun commented Aug 15, 2016

Houch... this is going to hit everywhere, especially for wcmd. At this point I even start to wonder if some heuristics trying to identify filenames would not be a "good" idea (in a "less bad than all the others" way). Although even something as simple as only quoting when it seems needed because of e.g. space in the arg might help a lot.

@goreliu goreliu closed this Aug 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants