Skip to content

Commit

Permalink
Disable Ctrl+S in bash and zsh
Browse files Browse the repository at this point in the history
Looks like fish and pwsh does not enable this by default... right?
  • Loading branch information
kachick committed Apr 10, 2024
1 parent 9867b19 commit 3011985
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 3011985

Please sign in to comment.