On Tue, Aug 4, 2015 at 3:38 AM David Adam <zanc...@ucc.gu.uwa.edu.au> wrote:
> On Tue, 4 Aug 2015, Mike Meyer wrote: > > And I just gave myself an idea for an implementation: > > > > function suspend > > if status --is-login > > echo cannot suspend login shell >&2 > > else > > kill -STOP %self > > end > > end > > > > Seems to work like a charm. Unless someone objects before I get back to > a > > terminal, I'll submit a pull request for this. > > I'm not opposed to merging this, but I have to ask - why do you want to > suspend your shell? Is there a use case that isn't covered by the state > shared across shells such that exiting and restarting isn't sufficient? > The use case isn't about shared data. In fact, I can't think of a use case where for suspending a program that would be solved by that, so I'm curious as to what your use cases are? I suspend programs to quickly switch between different environments, like dropping out of vi to issue shell commands. In this case, the two environments both happen to be command shells. In some cases, it's because the shells need different values in the OS - userids, or some kind of virtual environment, or possibly system call emulation layers. Sometimes, it's for stuff in the shell, like needing cc or make to be something other than the system versions. Come to think of it, fish sharing data may cause some of those last ones to break. I'll have to try it and see now that I can switch back and forth easily.
------------------------------------------------------------------------------
_______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users