mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 02:13:47 +01:00
ad125abf6a
fixes #8577 # Description Currently, using `which` on an alias describes it as a nushell built-in command: ```bash > alias foo = print "foo!" > which ls foo --all ╭───┬─────┬──────────────────────────┬──────────╮ │ # │ arg │ path │ built-in │ ├───┼─────┼──────────────────────────┼──────────┤ │ 0 │ ls │ Nushell built-in command │ true │ │ 1 │ ls │ /bin/ls │ false │ │ 2 │ foo │ Nushell built-in command │ true │ ╰───┴─────┴──────────────────────────┴──────────╯ ``` This PR fixes the behaviour above to the following: ```bash > alias foo = print "foo!" > which ls foo --all ╭───┬─────┬──────────────────────────┬──────────╮ │ # │ arg │ path │ built-in │ ├───┼─────┼──────────────────────────┼──────────┤ │ 0 │ ls │ Nushell built-in command │ true │ │ 1 │ ls │ /bin/ls │ false │ │ 2 │ foo │ Nushell alias │ false │ ╰───┴─────┴──────────────────────────┴──────────╯ ``` # User-Facing Changes Passing in an alias to `which` will no longer return `Nushell built-in command`, `true` for `path` and `built-in` respectively. # Tests + Formatting # After Submitting |
||
---|---|---|
.. | ||
commands | ||
format_conversions | ||
main.rs |