Skip to content

bug: ls strips directory path from file arguments #849

@chaliy

Description

@chaliy

Problem

Bashkit's ls builtin strips directory paths from arguments, returning only filenames when given full paths.

Reproduction

mkdir -p /tmp/test
echo x > /tmp/test/a.md
echo y > /tmp/test/b.md
ls -t /tmp/test/*.md

Real ls: /tmp/test/a.md\n/tmp/test/b.md
Bashkit ls: a.md\nb.md

Impact

Scripts that pass ls output to other commands (e.g., ls -t dir/*.md | xargs awk) get filenames without paths, causing "file not found" errors. Used in wedow/ticket's cmd_closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions