Re:Nushell: Introduction to a New Kind of Shell
by SighMagi on Tuesday November 01, 2022 @03:00PM
(#33425829)
In the past, I've toured these alternate, non-POSIX shells like Nushell. A lot of them (e.g. Powershell, Elvish) don't provide job control. I looked into how job control works and it's kind of a bother, so I see why they might have elided it. I wonder if multiplexing the terminal using tmux or screen is a good enough alternative the job control for many use-cases. You do lose state (i.e. environment variables, working directory), but if all you want to do is run something else maybe it's good enough.
I personally haven't tried living without job control though.
Re:Nushell: Introduction to a New Kind of Shell
by parhamn on Tuesday November 01, 2022 @03:26PM
(#33426177)
My data point: I prefer tmux/multiplexing over job control because the process hierarchy leads me to managing them better (I never accidentally quit tmux). Also I don't have to worry about std stream usage. I'm actually not sure of a case I'd care for job control.
Re:Nushell: Introduction to a New Kind of Shell
by yencabulator on Wednesday November 02, 2022 @06:08PM
(#33443602)
The problem with tmux is that I often start a long process without really realizing it, then control-Z bg to continue working with the shell. With tmux, I'd need to either realize up front I'm about to start a long-living thing, or lose the context of the current shell to continue my interactive work.
Re:Nushell: Introduction to a New Kind of Shell
by Natfan on Wednesday November 02, 2022 @12:48PM
(#33438849)
Sorry, but you're incorrect here. PowerShell does most definitely provide job control.
Get-Help about_Jobs
Alternatively, online documentation from Microsoft regarding jobs: https://learn.microsoft.com/en-us/powershell/module/microsof...
Re:Nushell: Introduction to a New Kind of Shell
by SighMagi on Thursday November 03, 2022 @02:17AM
(#33447682)
I think you must be unfamiliar with job control, but I could be wrong. How do you Ctrl+Z a foreground job, maybe several, and then switch between them.
All of what “powershell” provides depends on knowing you want to background something ahead of time, and even then I don’t think you can make it the foreground task (maybe wait job comes close) There is even a Github issue on it, which I’m afraid I can’t be bothered to go find again
Re:Nushell: Introduction to a New Kind of Shell
by lisnake on Tuesday November 01, 2022 @04:41PM
(#33427197)
You might be interested in Cat9, https://github.com/letoram/cat9
It's another reimagination of a shell, but built around asynchronous jobs
:( seems like that would be a very basic feature.
https://github.com/nushell/nushell/issues/1329
https://github.com/nushell/nushell/issues/1796
https://github.com/nushell/nushell/discussions/5239