diff options
author | Steven Hall <Hallzy.18@gmail.com> | 2015-10-18 16:27:32 -0700 |
---|---|---|
committer | Steven Hall <Hallzy.18@gmail.com> | 2015-10-18 16:27:32 -0700 |
commit | 8bef8d80648accd2806ad44e8db6e3aacd92d2e7 (patch) | |
tree | 7074e62288ed1baf19184b82c55e2026293fce59 /git-radar | |
parent | 3bdb43d9dad5766c23a34e438ad3fbd05823b6bd (diff) | |
download | git-sonar-8bef8d80648accd2806ad44e8db6e3aacd92d2e7.tar.gz git-sonar-8bef8d80648accd2806ad44e8db6e3aacd92d2e7.zip |
Custom Fetch time now uses a variable
Set the variable GIT_RADAR_FETCH_TIME in a bashrc, zshrc or gitradarrc file to
customize the fetch time.
Diffstat (limited to 'git-radar')
-rwxr-xr-x | git-radar | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -84,37 +84,16 @@ if [[ -z $@ ]]; then echo " end" echo "" echo " Same as the Bash but for fish." - echo "" - echo "Fetch_t example:" - echo " export PS1=\"\\W\\\$(git-radar --bash --fetch_t 45) \"" exit fi while [[ $# > 0 ]];do command="$1" shift - # Default fetch of 5 min if [[ "$command" == "--fetch" ]]; then nohup $dot/fetch.sh >/dev/null 2>&1 & fi - # Custom fetch of whatever time interval the user wants - if [[ "$command" == "--fetch_t" ]]; then - # Now $1 is the value for fetch_t - # If value is not a number produce an error - if ! [[ $1 =~ ^[0-9]+$ ]] ; then - echo "" - echo "Error: fetch_t did not receive a number" - echo "Defaulting to 5 min." - echo " " - nohup $dot/fetch.sh >/dev/null 2>&1 & - else - command="$1" - shift - nohup $dot/fetch.sh $command >/dev/null 2>&1 & - fi - fi - if [[ "$command" == "--zsh" ]]; then $dot/prompt.zsh $args fi |