Mel Massadian

Results 465 comments of Mel Massadian

Yes I think @NotTheDr01ds you nailed it. `/some/path` is in fact `cd`ing to it. Another interesting aspect of those executing backticks is that although as you mention flags don't seem...

I'm running into the opposite problem. `sudo -s` runs all command in nushell, what is the value of your `$env.SHELL`?

I think the op's issue is having the `SHELL` set to bash or zsh. So I would say yes, but let's see if it's that

From the man page using `$env.SHELL` is the way to integrate with `sudo -s`, not providing `-s` doesn't use a shell and for instance on macOS would run `/bin/ls`

Thats another issue all together I think, this table should help: https://github.com/nushell/nushell/issues/11847#issuecomment-1946049482

You unfortunately can't, you would have to run it without -s and call nu. I don't use default locations either and it's a bit of a pain Edit: there is...

Do you have other use cases for flags that accepts booleans or is it just to solve passing them to external commands? The **alternatives** part I believe this is doable...

Maybe I was not clear but I meant that this shoud be doable in `run-external` ```nu def do_it [--push] { let flags = [] let flags = if ($push) {...

Oh my bad, while first reading the issue I skipped exactly this part of your issue (where you suggest the same solution without `run-external`)!

I think the OP wants to conditionally set flags for a wrapper. Hence the need for a value flag (--b:bool). If I understand right this is to wrap externals. Although...