You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For from-* and to-*, how about changing to parse-json and to-json?
I'm not sure what to do about open, because it really is a pretty great name. In fact, Ruby has an open that works with URLs and files just like our open
How can we ensure someone looking at [parse/from]-x or to-x knows exactly what inputs are expected? I see the confusion coming from the inputs expectations as well since it's different from what most people are used to, meaning a string or structured data.
I think we should add more documentation and examples and see how it plays out.
parse-json tells me (from a programmer perspective) is ideal for strings as input (which is the behavior), what about a sys admininistrator? What about as-json? (json --read|--out)?
I think we should stick with open since so far the comments have been mostly for opening URL's, apps, and the Finder under macOS (and the majority of the time shell users work with files within the terminal)
In general, I'm holding back from doing command overloads like that because our signature support is limited at the moment. That said, if you need very significant overloads to accomplish something, it might end up being confusing anyway or causing other problems.
Can you elaborate what you're worried about with parse?
In general, I'm holding back from doing command overloads like that because our signature support is limited at the moment. That said, if you need very significant overloads to accomplish something, it might end up being confusing anyway or causing other problems.
I agree and it's something I would like to definitively avoid too.
Can you elaborate what you're worried about with parse?
No worries. I do like more the idea of naming things differently out of the usuals we see everywhere. parse is perfectly fine.
I still believe we could wait more and see what feedback we get, provided we have more documentation and examples in place.
@twe4ked - something like that could work. Is string-stats too long, I wonder. count by itself seems like you're counting rows but maybe there's something we could add to make it more obvious.
We could also consider making it part of the str command (cc @androbtech)
I suggest we use either read for open and write for save or load for open and store for save. Although write is historically used to message another user on the same unix system, I suppose it's not heavily used these days...
This one is pretty old, so the names have settled for some time and I think with our current momentum and user base it would be a huge hit to have things change. We now have
from <format> and to <format>
open is still the same, but we have start to mimic the "open" command in OSX.
We also have aliases, so we should make it possible basically rename everything.
Yes, open in nu-shell should be changed, open cli command has been in MacOSX since the very early days and this will just cause confusion and frustration.
Or then a way to rename nu shell commands so I could map 'open' or 'read' or 'load'.
Masking macOS's open was unexpected; it was not straightforward to get it back and it is used by macOS users frequently (speaking for myself and friends). read/write sounds awesome.
as json is confusing; does it mean parse an input string as json, or treat (by converting) an input data table as json? to and from are great; we just need to better document their help and error messages.
I just tried nu shell (at the recommendation of No Boilerplate) and was also immediately disappointed to find that nu conflicts with the built-in open command on macOS. It caused an error for literally the first thing I tried to do:
~> open -R $nu.env-path 05/25/2023 09:43:53 PM
Error: nu::parser::unknown_flag
× The `open` command doesn't have flag `-R`.
╭─[entry #11:1:1]
1 │ open -R $nu.env-path
· ┬
· ╰── unknown flag
╰────
help: Available flags: --help(-h), --raw(-r). Use `--help` for
more information.
I'll try workarounds, but this is an unfortunate first experience on macOS.
Activity
wycats commentedon Aug 26, 2019
For
from-*andto-*, how about changing toparse-jsonandto-json?I'm not sure what to do about
open, because it really is a pretty great name. In fact, Ruby has anopenthat works with URLs and files just like ouropenandrasio commentedon Aug 26, 2019
How can we ensure someone looking at
[parse/from]-xorto-xknows exactly what inputs are expected? I see the confusion coming from the inputs expectations as well since it's different from what most people are used to, meaning astringor structured data.I think we should add more documentation and examples and see how it plays out.
parse-jsontells me (from a programmer perspective) is ideal for strings as input (which is the behavior), what about a sys admininistrator? What aboutas-json? (json --read|--out)?I think we should stick with
opensince so far the comments have been mostly for opening URL's, apps, and the Finder under macOS (and the majority of the time shell users work with files within the terminal)wycats commentedon Aug 26, 2019
In general, I'm holding back from doing command overloads like that because our signature support is limited at the moment. That said, if you need very significant overloads to accomplish something, it might end up being confusing anyway or causing other problems.
Can you elaborate what you're worried about with
parse?twe4ked commentedon Aug 26, 2019
sizewas another one conflicting with a MacOS command.countwas suggested, shall we go with that?andrasio commentedon Aug 26, 2019
I agree and it's something I would like to definitively avoid too.
No worries. I do like more the idea of naming things differently out of the usuals we see everywhere.
parseis perfectly fine.I still believe we could wait more and see what feedback we get, provided we have more documentation and examples in place.
sophiajt commentedon Aug 26, 2019
@twe4ked - something like that could work. Is
string-statstoo long, I wonder.countby itself seems like you're counting rows but maybe there's something we could add to make it more obvious.We could also consider making it part of the
strcommand (cc @androbtech)kuchta commentedon Aug 27, 2019
I suggest we use either
readforopenandwriteforsaveorloadforopenandstoreforsave. Althoughwriteis historically used to message another user on the same unix system, I suppose it's not heavily used these days...thegedge commentedon May 16, 2020
This one is pretty old, so the names have settled for some time and I think with our current momentum and user base it would be a huge hit to have things change. We now have
from <format>andto <format>openis still the same, but we havestartto mimic the "open" command in OSX.We also have aliases, so we should make it possible basically rename everything.
Port str to-decimal to into decimal command. (nushell#408)
Port str to-decimal to into decimal command. (#408)
pohl commentedon May 16, 2022
New user here, giving
nua test-drive on MacOS, and I was disappointed by this issue being closed.I could not find a way to get
startto work. Did this regress, or is there some documentation somewhere?DuncanHills commentedon Jun 17, 2022
exact same experience as @pohl
ksandvik commentedon Aug 10, 2022
Yes, open in nu-shell should be changed, open cli command has been in MacOSX since the very early days and this will just cause confusion and frustration.
Or then a way to rename nu shell commands so I could map 'open' or 'read' or 'load'.
hyiltiz commentedon Sep 2, 2022
Masking macOS's
openwas unexpected; it was not straightforward to get it back and it is used by macOS users frequently (speaking for myself and friends).read/writesounds awesome.as jsonis confusing; does it mean parse an input string as json, or treat (by converting) an input data table as json?toandfromare great; we just need to better document theirhelpand error messages.connormcmk commentedon Nov 11, 2022
+1 for
read/writeand +1 for neither^opennorstartworking for me.Also, a copy to clipboard command would be cool. Like
version | to md | clipboardUpdate i18n.nu add `outdated` command to check outdated translations (n…
lgarron commentedon May 26, 2023
I just tried
nushell (at the recommendation of No Boilerplate) and was also immediately disappointed to find thatnuconflicts with the built-inopencommand on macOS. It caused an error for literally the first thing I tried to do:I'll try workarounds, but this is an unfortunate first experience on macOS.
amtoine commentedon May 26, 2023
@lgarron 👋
we have a section in the Nushell book about this problem 👍
this will
openas the built-inopenyou're used to on MacOSnuopencommand that does the same as Nushell's built-inopen😌
lgarron commentedon May 26, 2023
Thanks!