Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Commit

Permalink
lowercased internal environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
reujab committed Jul 13, 2017
1 parent 5d80e06 commit c112601
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmdtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func cmdTimeSegment(segment *segment) {
duration, err := time.ParseDuration(os.Getenv("CMDTIME"))
duration, err := time.ParseDuration(os.Getenv("cmdtime"))
if err != nil {
if shell == "bash" {
fmt.Fprintln(os.Stderr, "bronze: The 'cmdtime' command is supported in bash.")
Expand Down
2 changes: 1 addition & 1 deletion init.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROMPT_COMMAND=bronze_prompt
bronze_prompt() {
PS1="$(STATUS=$? JOBS=$(jobs -p | wc -l) bronze print "${BRONZE[@]}") "
PS1="$(status=$? jobs=$(jobs -p | wc -l) bronze print "${BRONZE[@]}") "
}
2 changes: 1 addition & 1 deletion init.fish
Original file line number Diff line number Diff line change
@@ -1 +1 @@
function fish_prompt; env STATUS=$status JOBS=(count (jobs -p)) CMDTIME={$CMD_DURATION}ms bronze print $BRONZE; echo -n ' '; end
function fish_prompt; env status=$status jobs=(count (jobs -p)) cmdtime={$CMD_DURATION}ms bronze print $BRONZE; echo -n ' '; end
2 changes: 1 addition & 1 deletion init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ preexec() {
}

precmd() {
PROMPT="$(env STATUS=$? JOBS=$#jobstates CMDTIME=$(($(date +%s%3N)-$BRONZE_START))ms bronze print "${BRONZE[@]}") "
PROMPT="$(env status=$? jobs=$#jobstates cmdtime=$(($(date +%s%3N)-$BRONZE_START))ms bronze print "${BRONZE[@]}") "
}
4 changes: 2 additions & 2 deletions status.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ func statusSegment(segment *segment) {
segment.value += icons["readonly"]
}

status, err := strconv.Atoi(os.Getenv("STATUS"))
status, err := strconv.Atoi(os.Getenv("status"))
check(err)
if status != 0 {
segment.value += icons["failed"]
}

jobs, err := strconv.Atoi(os.Getenv("JOBS"))
jobs, err := strconv.Atoi(os.Getenv("jobs"))
check(err)
segment.value += strings.Repeat(icons["job"], jobs)
}

0 comments on commit c112601

Please sign in to comment.