Closed rbpatt2019 closed 2 years ago
That a bit long and probably sounds a bit more cranky than I meant I meant it to! I've fallen head over heels for nutshell
and would be happy to help, where possible, but my knowledge of Rust is limited, at best.
Thanks for the great tool!
I'm shocked that you can enter
into a file in engine-q. atm I'm not sure we're going to support value shells
and only have filesystem shells
. value shell
is our term for enter
ing files like a Cargo.toml.
Is that a deal-breaker for you? I'm interested in thoughts people have about value shells
.
Not at all! I've always thought this feature was a little esoteric. Given the strength of the table support, I was never sure what benefit, if any, there was to the value shells
. The usual open file | where ...
etc. always seemed more logical. There should be one, and preferably only one, obvious way to do it 😆 and open
seems far more intuitive for files to me.
I was playing around with
engine-q
to get a sense of the differences between it andnushell
, and came across some odd behaviour forenter
. I recognise that engine-q is making quite a few changes in how it handles things, but the below behaviour still seems, well, odd!On
nushell
, one couldenter
a structured file and then use commands likels
within thatshell
, as in the below image (within a local clone of theengine-q
repo).When I do the same in
engine-q
, I can successfully enter the shell and then things get wonky. Every command returns anu::shell::io_error
, but they all still run.shell
still lists the newly created shell, I canls
(more on that shortly), andexit
.I suspect this is related to how the path in the shell is being set. When I compare the output of
shell
, nu shell creates a "fake" root path at the entry to the file - hence, everything is detected as a directory.engine-q
doesn't seem to do this. The path for the shell is just the file name, so everything fails afterenter
because it's not a directory. I suspect that this is also whyls
returns no data.If every command after
enter
ing a shell is going to error as it's not a directory, then I think it makes a bit more sense to have theenter
command error and prevent this. Ifengine-q
is still going to allowenter
ing a file, then I think the allow inputs probably need to be changed so every command doesn't error. In either case, I would expect that commands that error should also run.