Skip to content

Commit

Permalink
environment: improve the TTY check (sorin-ionescu#1785)
Browse files Browse the repository at this point in the history
Bug report from @qosmio:
sorin-ionescu#1771 (comment)

I'm unable to reproduce it and @qosmio hasn't yet confirmed or
disconfirmed whether this fix works. It's a good idea to change
the code this way in either case.

(As I mentioned in sorin-ionescu#1771, this `stty -ixon` call may have been added
by mistake. It doesn't do what the comment suggest and is at least as
likely to be harming users as helping them.)
  • Loading branch information
romkatv authored and Tom McSweeney committed Sep 1, 2023
1 parent b361d01 commit 104d302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/environment/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Gar
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.

# Allow mapping Ctrl+S and Ctrl+Q shortcuts
[[ -n ${TTY:-} && $+commands[stty] == 1 ]] && stty -ixon <$TTY >$TTY
[[ -r ${TTY:-} && -w ${TTY:-} && $+commands[stty] == 1 ]] && stty -ixon <$TTY >$TTY

#
# Jobs
Expand Down

0 comments on commit 104d302

Please sign in to comment.