-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I have a shell command written in nu that has a shebang at the top. I cannot get nufmt to format this file unless I rename it to *.nu or I use the --stdin flag.
Lines 319 to 322 in 3596222
| fn is_nu_file(entry: &DirEntry) -> bool { | |
| entry.file_type().map(|ft| ft.is_file()).unwrap_or(false) | |
| && entry.path().extension().is_some_and(|ext| ext == "nu") | |
| } |
Steps To Reproduce
Steps to reproduce the behavior:
- Have nu file without the
.nufile extension such asmy-command - Run
nufmt my-command - Observe error "warning: no Nushell files found under the given path(s)⏎"
Expected behavior
I expect nufmt to format the file because I specified the file on the CLI.
Environment
Please run rustc --version and paste the result.
[user@system:~]$ rustc --version
rustc 1.91.1 (ed61e7d7e 2025-11-07)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working