Skip to content

pwd command. #604

@andrasio

Description

@andrasio

It'd be nice having our own pwd command. At the moment, doing pwd we get the expected behavior but if we enter a file, since the filesystem view becomes an abstraction and we use the current path to keep track where in the file we currently are, doing pwd will fail.

Reproducing:

> curl https://api.github.com/orgs/nushell | from-json | embed details
━━━━━━━━━━━━━━━━
 details
────────────────
 [table: 1 row]
━━━━━━━━━━━━━━━━

> curl https://api.github.com/orgs/nushell | from-json | embed details | save data.json
> enter data.json
/> ls
━━━━━━━━━━━━━━━━
 details
────────────────
 [table: 1 row]
━━━━━━━━━━━━━━━━

/> cd details
/details> ls | pick public_members_url
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 public_members_url
─────────────────────────────────────────────────────────────
 https://api.github.com/orgs/nushell/public_members{/member}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

/details> pwd
error: No such file or directory (os error 2)

The expected behavior should be:

/details> pwd
/details

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