diff --git a/samples/dotfiles/shell.sh b/samples/dotfiles/shell.sh index 60b72c15..2907bec5 100644 --- a/samples/dotfiles/shell.sh +++ b/samples/dotfiles/shell.sh @@ -37,6 +37,10 @@ VISUAL=vi # done # unset editor preferred_editors +# Allow us to use Ctrl+S to perform forward search, by disabling the start and +# stop output control signals, which are not needed on modern systems. +stty -ixon + # Set a shell option but don't fail if it doesn't exist! safe_set() { shopt -s "$1" >/dev/null 2>&1 || true; } diff --git a/website/content/docs/part-5-building-your-toolkit/managing-your-dotfiles/_index.md b/website/content/docs/part-5-building-your-toolkit/managing-your-dotfiles/_index.md index 064ffa5a..297d6ca0 100644 --- a/website/content/docs/part-5-building-your-toolkit/managing-your-dotfiles/_index.md +++ b/website/content/docs/part-5-building-your-toolkit/managing-your-dotfiles/_index.md @@ -228,6 +228,16 @@ In this method we specify an array of editors, go through each one, check to see You'll notice that in the _~/effective-shell/dotfiles/shell.sh_ folder I `unset` every shell variable after I use it. This is just to clean up after myself and try to leave the environment as pristine as possible after sourcing the file. +Another useful option to set is `stty -ixon`: + +```sh +# Allow us to use Ctrl+S to perform forward search, by disabling the start and +# stop output control signals, which are not needed on modern systems. +stty -ixon +``` + +This command tells the terminal driver that we don't need to control transmission with the Ctrl+Q and Ctrl+S commands, meaning we can instead use Ctrl+S to perform a forward search. + Now let's set some sensible settings for working with folders: ```sh