View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000601 | file | General | public | 2024-12-24 04:33 | 2024-12-26 18:22 |
Reporter | Anton Monroe | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | open | ||
Product Version | 5.46 | ||||
Summary | 0000601: file name that starts with "-" / documentation | ||||
Description | 'file' does not handle file names that start with "-". I thought that quoting the filename should work but it doesn't. So file -foo.txt file "-foo.txt" file *foo.txt all yield: F:\USR\LOCAL\BIN\file.exe: Cannot open `oo.txt' (No such file or directory) this works: file -- -foo.txt but the "--" switch is not documented in the file(1) man page | ||||
Tags | No tags attached. | ||||
|
Like many (most?) other programs file(1) uses getopt(3) where the '--' indicating end-of-options is documented. The only other program explicitly mentioning this in the documentation is rm(1) and this is because newbs have trouble removing files that start with a '-'. For example ls(1) or mv(1) don't mention it. I don't think every program should mention standard command line behavior. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-12-24 04:33 | Anton Monroe | New Issue | |
2024-12-26 18:19 | christos | Assigned To | => christos |
2024-12-26 18:19 | christos | Status | new => assigned |
2024-12-26 18:22 | christos | Status | assigned => feedback |
2024-12-26 18:22 | christos | Note Added: 0004137 |