Skip to content

Issue with screen, Ctrl-s, and fish #814

Closed

Description

@d5ve

I use Ctrl-s as my GNU screen escape key, rather than the default Ctrl-a. This doesn't seem to work when I use fish (2.0 or master) as my shell.

Nothing at all happens when I press Ctrl-s, and whatever I type next just appears in the terminal. For example the screen command to create a new window is "Ctrl-s c", but this just prints the "c" into the terminal.

Under bash I did have to turn off terminal flow control with "stty -ixon" to use Ctrl-s, but this setting doesn't seem to change anything under fish.

Activity

  1. d5ve commented on May 23, 2013

    @d5ve
    Author

    More info: Everything works fine if I start a bash shell, then create or attach to a screen session from within that, even though the windows in the screen session are all themselves using fish as the shell.

  2. zanchey commented on May 24, 2013

    @zanchey
    Member

    I can reproduce this with fish 924b646 and screen 4.00.03jw4.

    The problem appears to be that stty -ixon is indeed needed but that the flow control status gets reset every time fish prints the prompt.

    A workaround is stty -ixon; screen -e \^Ss.

  3. d5ve commented on May 24, 2013

    @d5ve
    Author

    That workaround fixed things for me, thanks. I just changed my current alias/function for starting screen to include the stty stuff.
    I'm closing this, as it's a pretty edge-case "bug".

  4. naggie commented on Jul 30, 2013

    @naggie

    I experience this problem. Specifically, I can't turn off flow control like I can with bash using stty -ixon -ixoff so whenever I'm using fish (tmux or not, vim or not) accidentally pressing CTRL+S will lock the terminal.

    I assumed this was instability before, until I discovered that CTRL+Q could bring it back. However, I would much rather just turn flow control off.

  5. zanchey commented on Jul 31, 2013

    @zanchey
    Member

    Reopening... we really should respect existing terminal modes, especially -ixon -ixoff. I wonder if we should even turn it off by default - is there any good use case for it?

  6. naggie commented on Jul 31, 2013

    @naggie

    Agreed.

    I think it should be turned off by default; because this is an ancient, depreciated 'feature' that is not really used today.Who would use fish over a VT100? Especially as it's not compatible anyway. I think it's more likely to cause confusion and a bad impression of fish if left on.

    Whilst other terminals leave it on for compatibility, fish places itself as a modern shell.

    If anyone needs to use it, they'll know what it is and how to configure it.

    Cheers
    Cal

  7. leeola commented on Aug 16, 2013

    @leeola

    I too ran into this, quite annoying when the standard solution of stty -ixon seemingly didn't work in Fish. I thought i had to change shells

  8. zanchey commented on Aug 23, 2013

    @zanchey
    Member

    OK, so the real problem here is that we save the terminal mode when we start a new job, then restore it when it completes. This protects our terminal against accidentally catting a binary file, and similar problems, but it means that stty has exactly zero effect. Not sure what the right solution here is; special-casing stty seems like it could cause problems. Even if we turn XOFF/XON off by default, there should probably be a way to restore it...

  9. ridiculousfish commented on Sep 23, 2013

    @ridiculousfish
    Member

    7ce5f34 disables flow control - let's see if anyone complains. I also don't know what to do about stty.

    Thanks for reporting this.

  10. naggie commented on Sep 23, 2013

    @naggie

    Awesome :-) no problem. Thanks for fixing it.
    On 23 Sep 2013 02:17, "ridiculousfish" [email protected] wrote:

    7ce5f347ce5f34d6f2d86cc1e60b1830ac7a63bb478fb1fdisables flow control - let's see if anyone complains. I also don't know
    what to do about stty.

    Thanks for reporting this.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/814#issuecomment-24895040
    .

  11. trulyliu commented on Dec 14, 2016

    @trulyliu

    I swtiched from bash to fish on ubuntu 16.04 recently,
    CTRL-S and CTRL-Q does not work as before.
    Are there any configuration can be used to flow control on?

  12. faho commented on Dec 14, 2016

    @faho
    Member

    @trulyliu: Fish disables flow control, i.e. that feature. There currently is no configuration option to reenable it.

    If you wish to propose a way to change that, #2315 should be the correct issue to do that.

  13. locked as resolved and limited conversation to collaborators on Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions