# [[Bash Tips]]
_Created: 2025-06-24_ | #scripting/bash | [[Bash]]
## Fixing terminal settings messing with forward search
`Ctrl-r` starts incremental backwards search in history. `Ctrl-s` is supposed to search forward (say you went back too far and want to reach a result you missed). However, most terminals use `Ctrl-s` for _XON/XOFF flow control_.
The solution is to run `stty -ixon` in the terminal.
While it is best to add that to the bash profile, it may throw an error message in non-interactive logins to the machine, e.g. with ssh. [The foolproof way](https://stackoverflow.com/a/25391867/390514) is to check for interactivity and only then run `stty`.
```bash
[[ $- == *i* ]] && stty -ixon
```