Created
November 23, 2010 16:40
-
-
Save mtrudel/712063 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| whereami() | |
| { | |
| export THIS_IS_NOT_MY_BEAUTIFUL_HOUSE=$1 | |
| } | |
| __thereami() | |
| { | |
| local curtask="$THIS_IS_NOT_MY_BEAUTIFUL_HOUSE" | |
| if [ -n "$curtask" ]; then | |
| if [ -n ${1-} ]; then | |
| printf "${1-}" $curtask | |
| fi | |
| fi | |
| } | |
| # | |
| # Add the following block to your PS1 as desired. The argument to __thereami | |
| # will be echoed back if a todo is set, with the todo filled in as %s | |
| # | |
| # As an example, the following will add !!<todo text>!! in red into your | |
| # prompt, assuming that you have colour codes set up as per lines 16-31 of | |
| # https://github.com/mtrudel/dotfiles/blob/master/bashrc | |
| # | |
| # \$(__thereami '\[${RED}\]!!%s!!\[${NOCOLOR}\]') | |
| # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment