Skip to content

Documentation on type path doesn't match behaviour #2155

@Lingshinx

Description

@Lingshinx

String won't be expanded into a fully pathname when passed as an arguments with type of path

Document

Doc's here Nushell Type Path

def show_difference [
 p: path
 s: string
] {
 print $"The path is expanded: ($p)"
 print $"The string is not: ($s)"
}

# Results
cd ~/testing
show_difference . .
# => The path is expanded: /home/username/testing
# => The string is not: .

Actually

show_difference . .
# => The path is expanded: .
# => The string is not: .

nu --version
# => 0.112.2

You wouldn't be surprised. Code changes fast around here. Just a reminder
I like nushell, thanks for all works of yours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions