Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[prompt, test, cleanup] Add a cache for the prompt tokens.
Also: - Add a real-world demo/test for $PS1 (that still needs work.) - Add a cache for the prompt tokens - Rename to prompt.test.sh. - [spec/loop] Make the test case a bit harder.
- Loading branch information
Andy Chu
committed
Oct 14, 2018
1 parent
832b497
commit 0ebce48
Showing
6 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# | ||
# Copied from my bashrc. | ||
|
||
# TODO: The branch name isn't being displayed? | ||
git-prompt() { | ||
. testdata/completion/git | ||
. ~/git-prompt.sh | ||
|
||
export PS1='\u@\h \w$(__git_ps1 " (%s)")\$ ' | ||
} | ||
|
||
git-prompt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters