aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-10 22:10:10 +0000
committerKaz Kylheku <kaz@kylheku.com>2025-02-10 22:10:10 +0000
commit2aaa3ad7bac80cc63ec2b9e656c1421a7110abe0 (patch)
tree51681343f7c66d776280feb2b72926ac1e35f3a9 /README.md
parent961190652d4fa28a7d3c050d0e4fe6263e3c6ea4 (diff)
downloadbasta-2aaa3ad7bac80cc63ec2b9e656c1421a7110abe0.tar.gz
basta-2aaa3ad7bac80cc63ec2b9e656c1421a7110abe0.tar.bz2
basta-2aaa3ad7bac80cc63ec2b9e656c1421a7110abe0.zip
Improve basta.fullscreen; add basta.fullscreen_alt.
- basta.fullscreen sets LINES also in addition to stty rows, and also resets the scrolling region. - bata.fulscreen_alt uses an escape sequence to move to the last line instead of multiple \n characters. Additionally, after moving to the last line, it issues some newlines to scroll the screen, so that any material printed by the executed program is out of the way of the status area (taking into account stacked status lines).
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4086884..efb704f 100644
--- a/README.md
+++ b/README.md
@@ -100,6 +100,24 @@ nested Basta so that it allocates a new status line above the existing one.
Create `basta.fullscreen <program>` alias for each program that is to use
the full terminal.
+The `basta.fulscreen` function works well with well-behaved programs which save
+and restore the terminal screen contents and cursor position. Programs which
+do not save and restore the terminal can be handled with the alternative
+function `basta.fullscreen_alt`.
+
+Note for `git` users: though the `less` pager used by `git` normally saves
+and restores the terminal by default, `git` runs it in such a way that it does
+not do this: `git` adds some arguments to `less`. To fix the behavior, add a
+`[core]` configuration section to your `~/.gitconfig` file (if necessary) and
+then add the following `pager =` line to that section:
+
+ ::text
+ [core] # add if necessary
+ pager = less -+Xn -+F
+
+With this, you can use `alias git='basta.fullscreen git'`, rather than
+working around using `basta.fullscreen_alt`.
+
## Screenshots
![Screenshot of Basta](screenshot.png)