Repository navigation
Closed
Labels
status:needs-triageAn issue that hasn't had any proper look
Milestone
Description
Bug report form
- I have done a basic search of the issue tracker to find any existing issues that are similar.
- I have checked that my version is at least the latest stable release available via my installation method.
Describe the bug
: alias "from jsonc" = from json
: open deno.jsonc
Error: nu::shell::error
× Error while parsing as jsonc
╭─[repl_entry #3:1:6]
1 │ open deno.jsonc
· ─────┬────
· ╰── Could not parse '/Users/kuchta/Projects/RadixVerse/deno.jsonc' with `from jsonc`
╰────
help: Check out `help from jsonc` or `help from` for more options or open raw data with `open --raw '/Users/kuchta/Projects/RadixVerse/
deno.jsonc'`
Error: nu::shell::nushell_failed_spanned
× Nushell failed: Can't run alias directly. Unwrap it first.
╭─[repl_entry #3:1:1]
1 │ open deno.jsonc
· ──┬─
· ╰── originates from here
╰────
help: This shouldn't happen. Please file an issue: https://github.com/nushell/nushell/issues
How to reproduce
^^^
Expected behavior
Either allow aliases to be used wherever custom commands are supported or deprecate them altogether. Their definition is not much shorter than custom commands and learning and maintaining two syntaxes for commands is a waste of time.
Configuration
| key | value |
|---|---|
| version | 0.114.1 |
| major | 0 |
| minor | 114 |
| patch | 1 |
| branch | |
| commit_hash | |
| build_os | macos-aarch64 |
| build_target | aarch64-apple-darwin |
| rust_version | rustc 1.96.1 (31fca3adb 2026-06-26) (Homebrew) |
| cargo_version | cargo 1.96.1 (356927216 2026-06-26) (Homebrew) |
| build_time | 2026-07-11 15:27:28 +00:00 |
| build_rust_channel | release |
| allocator | standard |
| features | default, lsp, mcp, network, plugin, rustls-tls, sqlite, trash-support |
| installed_plugins | dns 4.0.6 |
| experimental_options | example=false, dc-glob=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=false, cell-path-types=false |
Reacted by Evgeny
Metadata
Metadata
Assignees
Labels
status:needs-triageAn issue that hasn't had any proper look
Activity
fdncred commentedon Jul 25, 2026
Why would we have aliases work identically to custom commands? This would make one of them essentially useles. You can do much more with custom commands than aliases. Aliases are meant for small things like
alias l = ls -l.kuchta commentedon Jul 25, 2026
@fdncred
First of all, I created this issue to report situation that nushell says shouldn't happen and should be reported.
Second, what's that syntactically "great" (as opposed to your small things) about
def l [] { ls -l }? If superfluous empty parameters array was made optional it would be exactly the same number of characters. That makes aliases essentially quite (redundant and) useless... I would say even harmful, if they can't be used where custom commands can, which can confuse new users...fdncred commentedon Jul 25, 2026
Thanks for the info. I still don't think we should have aliases do everything that custom commands do. custom commands can be hundreds of lines long. That doesn't seem right for aliases. However, if we removed aliases altogether, I wouldn't have a problem with it, especially since abbreviations exist now.
I do get your point about your example with
from jsonc. We could probably make that work, but still, that's not the same of having it do everything custom commands do.kuchta commentedon Jul 25, 2026
Maybe I didn't express myself clearly enough, but I definitely didn't mean to make aliases more powerful. Quite the contrary. I meant either to remove them completely or to make them just syntactic sugar for custom commands.
fdncred commentedon Jul 25, 2026
oh, I didn't get that at all from your issue. LOL. Probably a me problem. Thanks for clarifying. I could go for making them syntactic sugar for custom commands. I could also go for removing them completely but I'm sure that would cause an uproar.
kuchta commentedon Jul 25, 2026
The important thing is that we finally understood each other. 🙏🏻
I'm personally more inclined to remove aliases completely, especially if the superfluous empty parameters array is made optional in the custom command definition. When there are two syntax options for similar functionality, new users will inevitably wonder what the difference is.
`open`/`save`: give a clear error suggesting `def` when the `from`/`t…