aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: e62b720b277dff6b38227c88de7f72468278a37a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## What is this?

KAzinator's BAsh PROmpt!

This is code for Bash (the GNU Bourne-Again Shell) which maintains
a status line in the bottom-most line of the terminal screen.
The status line shows the date, host name and current directory
(possibly abbreviated to fit).

This allows me to have a simple prompt:

    ::text
    PS1='\$ '

To use the code put it into a file like `~/.bash_prompt` and
then source this file from some startup script, 
for instance by adding this line to `~/.bash_profile`:

    ::text
    .  ~/.bash_prompt

This requires Bash 4.4 or higher.

## Screenshot

![Screenshot of Kabapro](screenshot.png)

The clock actually updates. The code launches a background
process which periodically the SIGALRM signal to the shell,
whose trap calls the `update_status_line` function.

## License

This is under distributed under a modified two-clause BSD license.
See the license block at the bottom of the file.

The second clause says that any binary code (as if that would
exist for shell customization code, ha!) is not required to
carry any copyright notice.