Created
October 13, 2011 18:57
-
-
Save bobthecow/1285149 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
source ~/.rprompt.bash | |
export RPROMPT='$(date)' |
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
#!/bin/bash | |
# | |
# zsh style right prompt support :) | |
__rprompt() { | |
printf "%*s\r" "$COLUMNS" "$(eval echo "$RPROMPT")" | |
} | |
if [[ ! $PROMPT_COMMAND =~ __rprompt ]]; then | |
export PROMPT_COMMAND="__rprompt; ${PROMPT_COMMAND:-:}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to customize the date formatting, do something like this: