aboutsummaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md17
1 files changed, 13 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index 3425eee..23fa19f 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
1# pista 1# pista
2 2
3> a simple bash prompt for programmers 3> a simple {bash, zsh} prompt for programmers
4 4
5![pista.png](https://files.nerdypepper.me/52.png) 5![pista.png](https://files.nerdypepper.me/52.png)
6 6
@@ -22,12 +22,21 @@ http://rustup.rs and follow the instructions.
22make sure to add `$HOME/.cargo/bin` to your `$PATH`! 22make sure to add `$HOME/.cargo/bin` to your `$PATH`!
23 23
24 24
25once you have installed `pista`, set your `PS1` to use it! 25 - bash users, set your `PS1`:
26```shell 26```shell
27PS1="$(pista)" # regular variant 27PS1="$(pista)" # regular variant
28PS1="$(pista -m)" # minimal variant 28PS1="$(pista -m)" # minimal variant
29``` 29```
30 30
31 - zsh users, add this to your `.zshrc`:
32```shell
33autoinit -Uz add-zsh-hook
34_pista_prompt() {
35 PROMPT=$("pista") # `pista -m` for the miminal variant
36}
37add-zsh-hook precmd _pista_prompt
38```
39
31 40
32`pista` handles prompt modifications when you enter virtual environments. 41`pista` handles prompt modifications when you enter virtual environments.
33make sure to disable `virtualenv`'s changes. 42make sure to disable `virtualenv`'s changes.
@@ -39,8 +48,8 @@ thats it! read on if you aren't happy with the defaults.
39 48
40### configuration 49### configuration
41 50
42this is the default configuration. drop this in your `.bashrc` to get started. 51this is the default configuration. drop this in your `.bashrc` (or `.zshrc`) to get started.
43remember to `source ~/.bashrc` to observe the changes! 52remember to `source ~/.bashrc` (or `source ~/.zshrc`) to observe the changes!
44 53
45``` 54```
46# prompt string to display, for regular users 55# prompt string to display, for regular users