mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
a1f989caf9
related to - https://github.com/nushell/nushell/issues/9637#issuecomment-1629387548 # Description this PR changes the output of `which` from `table<arg: string, path: string, built-in: bool> (stream)` to `table<command: string, path: string, type: string> (stream)`. - `command`: same as `arg` but more explicit name - `path`: same as before, `null` when built-in - `type`: instead of `buil-in: bool` says if it's a `built-in` a `custom` command, an `alias` or an `external` # User-Facing Changes the output of `which` has changed ## some examples ```nushell > which open ╭───┬─────────┬──────┬──────────╮ │ # │ command │ path │ type │ ├───┼─────────┼──────┼──────────┤ │ 0 │ open │ │ built-in │ ╰───┴─────────┴──────┴──────────╯ ``` ```nushell > alias foo = print "foo" > which foo ╭───┬─────────┬──────┬───────╮ │ # │ command │ path │ type │ ├───┼─────────┼──────┼───────┤ │ 0 │ foo │ │ alias │ ╰───┴─────────┴──────┴───────╯ ``` ```nushell > def bar [] {} > which bar ╭───┬─────────┬──────┬────────╮ │ # │ command │ path │ type │ ├───┼─────────┼──────┼────────┤ │ 0 │ bar │ │ custom │ ╰───┴─────────┴──────┴────────╯ ``` ```nushell > which git ╭───┬─────────┬──────────────┬──────────╮ │ # │ command │ path │ type │ ├───┼─────────┼──────────────┼──────────┤ │ 0 │ git │ /usr/bin/git │ external │ ╰───┴─────────┴──────────────┴──────────╯ ``` ```nushell > which open git foo bar ╭───┬─────────┬──────────────┬──────────╮ │ # │ command │ path │ type │ ├───┼─────────┼──────────────┼──────────┤ │ 0 │ open │ │ built-in │ │ 1 │ git │ /usr/bin/git │ external │ │ 2 │ foo │ │ alias │ │ 3 │ bar │ │ custom │ ╰───┴─────────┴──────────────┴──────────╯ ``` # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - ⚫ `toolkit test` - ⚫ `toolkit test stdlib` # After Submitting mention that in the release note |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE |