8000 Is it possible to fix the bug caused by `ls *` matching files starting with `--`? · Issue #11534 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content
Is it possible to fix the bug caused by ls * matching files starting with --? #11534
@XiJet-Gary

Description

@XiJet-Gary

This issue also exists in Bash. Fixing it might incur more costs.

> touch -- --abcd
> ls *

Then I will got

ls: unrecognized option '--abcd'
Try 'ls --help' for more information.

This is a complaint about Linux I saw on the internet: when there are files starting with -, ls * fails. Although this is caused by the Unix command-line design, it seems impossible to fix.
(Perhaps we could try prepending ./ to files starting with -, like converting --abcd to ./--abcd?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0