Hacker News new | ask | show | jobs
by TheLocehiliosan 1327 days ago
Just was trying it. A couple minutes in, I discovered it doesn't support suspended 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

3 comments

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.

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...
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

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.
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.
I also use tmux for this. Personally, since starting to use tmux years ago, I've never even thought of wanting job control in an interactive shell process.
You might be interested in Cat9, https://github.com/letoram/cat9

It's another reimagination of a shell, but built around asynchronous jobs