Skip to content

Configurable behavior on expression (not command) input | Unnamed alias #2411

@LhKipp

Description

@LhKipp

Currently:

$ /etc

Would cd into the directory /etc
I want this behavior configurable. I would rather like the shell to ls /etc here.

As nushell is Syntax aware a mapping from
SyntaxShape1 -> alias
is possible as soon as aliases have signatures with meaning.

Describe the solution you'd like

alias --unnamed unnamed_ls [path] {ls $path}

nushell will now automatically deduct the type of path, check if one such mapping for this syntactical type exists already, and warn me if so. Otherwise typing "/etc" has the same result as "ls /etc" :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions