Skip to content

Commit

Permalink
Command line now takes precedent over environment variable. Doc updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xfennec committed Jan 25, 2016
1 parent b59ddfd commit fc8046c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions progress.1
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ display help message and exit

.SH ENVIRONMENT
It's possible to give permanent options using PROGRESS_ARGS environment variable.
See example below. Command line arguments take precedence over environment.

.SH EXAMPLES

Expand All @@ -109,6 +110,13 @@ Launch and monitor any heavy command using $!

.B cp bigfile newfile & progress \-mp $!


.RE
Use environment variable to set permanent (multiple) arguments
.RS

.B export PROGRESS_ARGS='-M \-\-ignore-file ~/.xsession-errors'

.RE
.SH BUGS
Please report bugs at: http://github.com/Xfennec/progress/issues
Expand Down
2 changes: 1 addition & 1 deletion progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ char *env_progress_args_full;

env_progress_args = getenv("PROGRESS_ARGS");

parse_options(argc,argv);
if (env_progress_args) {
int full_len;

Expand All @@ -833,6 +832,7 @@ if (env_progress_args) {
}
parse_options(env_wordexp.we_wordc,env_wordexp.we_wordv);
}
parse_options(argc,argv);

// ws.ws_row, ws.ws_col
ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
Expand Down

0 comments on commit fc8046c

Please sign in to comment.