diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -98,15 +98,25 @@ the full screen. Create `basta.fullscreen <program>` alias for each program that is to use the full terminal. -The `basta.fullscreen` function takes a single option, `-s`. If that -is specified, then then Basta will save and restore the terminal around -the invocation of the program. This should only be used for full-screen +The `basta.fullscreen` function takes two options, `-f` and `-s`. +They can be used together, and may be specified separately in any order +or clumped as `-fs` or `-sf`. + +The `-f` option will force full screen mode even if the function's +standard output is redirected such that it is not a terminal. +By default, if standard output is redirected, `basta.fullscreen` +just executes the specified command without preparing full screen mode. +The default behavior is sensible; it prevents a race condition between +`basta.fullscreen` coming out of fullscreen mode and restoring the status line, +and a subsequent pipeline element still running, concurrently producing output +to the terminal, resulting in a messed-up display. + +If the `-s` option is used, then then Basta will save and restore the terminal +around the invocation of the program. This should only be used for full-screen programs that don't output any messages outside of their full-screen paradigm, -which should persist in the terminal window. - -The `top` utility is a good target for this. Some versions of `top` do not -save and restore the screen, with with `basta.fullscreen -s top` we -get that behavior: +which should persist in the terminal window. The `top` utility is a good +target for this. Some versions of `top` do not save and restore the screen, +with with `basta.fullscreen -s top` we get that behavior: ::text alias top='basta.fullscreen -s top' |