Skip to content

Commit

Permalink
Merge pull request #561 from kachick/disable-ctrl-s-no-display
Browse files Browse the repository at this point in the history
Disable Ctrl+S in bash and zsh
  • Loading branch information
kachick authored Apr 10, 2024
2 parents 9867b19 + 3011985 commit afa2455
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions home-manager/bash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
fi
'';

# For interactive shells. In .bashrc and after early return
# https://github.com/nix-community/home-manager/blob/release-23.11/modules/programs/bash.nix#L221-L222
# And https://techracho.bpsinc.jp/hachi8833/2021_07_08/66396 may help to understand why .bashrc
#
# Extracting because embedded here requires complex escape with nix multiline.
initExtra =
''
Expand All @@ -126,6 +130,9 @@
source "${../dependencies/podman/completions.bash}"
source "${../dependencies/dprint/completions.bash}"
# Disable `Ctrl + S(no output tty)`
${lib.getBin pkgs.coreutils}/bin/stty stop undef
source "${config.xdg.configHome}/posix_shells/shared_functions.sh"
''
+ builtins.readFile ./initExtra.bash;
Expand Down
3 changes: 3 additions & 0 deletions home-manager/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@
source "${../dependencies/podman/completions.zsh}"
source "${../dependencies/dprint/completions.zsh}"
# Disable `Ctrl + S(no output tty)`
${lib.getBin pkgs.coreutils}/bin/stty stop undef
# https://unix.stackexchange.com/a/3449
source_sh () {
emulate -LR sh
Expand Down

0 comments on commit afa2455

Please sign in to comment.