Nate Fischer
Nate Fischer
> This removes all ambiguity around a statement like cat('file.txt').stdout, since file.txt may or may not be newline-terminated. This is a good point. `cat('file.txt').stdout` does not add a trailing newline,...
@scott113341 I see your point. I agree, there's an inconsistency. Ideally, I think the best solution would be this: - `pwd().stdout` might look like `foo/bar\n` (newline at the end) -...
Just looked over the API. It looks to me like we should edit the following functions: - `pwd()` - `echo()` - `which()` and leave everything else as-is. The only edit...
> Thanks for your attentiveness to this issue! My pleasure. Thanks for bringing it up (this is a good thing to catch before releasing v0.7)! > Would you like me...
This would involve appending a newline specifically to some `stdout` fields and not others, if I read that correctly, for the sake of making `stdout` look as much like the...
True, but that would be the inconsistency I pointed out above. Cat and ls would have different newline behavior when printed. Ls would either end with no trailing newline, or...
Some comments: > ShellString.prototype.stdout() The issue with this is that now it's pretty inconsistent with `exec()`'s return value. The idea is to make commands more similar, not less similar. Maybe...
> Regarding the exec() behavior, I don't understand (out of ignorance) how what I've proposed doesn't work It's just backwards compatibility. Exec has a property named `.stdout`, not a function...
> .trim() also might mess up the values. It trims leading and trailing whitespace. Absolute paths never have leading whitespace. Binaries (returned by `which`) very seldom have trailing whitespace. Directories...
I believe this issue has now, at least temporarily, been resolved in the case of n_shell and shx, without breaking backwards compatibility for ShellJS users. I agree there's some inconsistencies,...