Commit 38376d5
committed
lib: provide a prompt function for the dirstack
Providing this additional function for prompts allows anyone using
pushd/popd/dirs to navigate directory trees to quickly view their
stack and find which entry they want to switch to.
This degrades gracefully for anyone not using the directory stack since
dirs will always display the same as \w when the stack is only one entry
deep.
Setting DIRSTACK_EXPAND_TILDE to true in the environment will display
the directory stack with ~ expanded to the full path of the user's home
directory.
Setting DIRSTACK_LIMIT to any value greater than 0 will limit the
display to that number of entries, though the directory stack will still
contain all entries in it.
The bakke theme has been tweaked to use the new function as an example.
Signed-off-by: Joe MacDonald <[email protected]>1 parent 1c7f6d6 commit 38376d5
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
588 | 614 | | |
589 | 615 | | |
590 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
0 commit comments