Last active
April 22, 2016 06:59
-
-
Save andkirby/831aed85d166c6c93511c6856d8dc061 to your computer and use it in GitHub Desktop.
Example of PS1 with condition.
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
#!/usr/bin/env bash | |
alias __ch_task='if [[ "" != $(git rev-parse --git-dir 2> /dev/null) ]]; then echo -n $(ch config task); fi;' | |
export PS1='$(__ch_task)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment