diff --git a/README.md b/README.md index c20a5a8b5..ebf4fd5cd 100644 --- a/README.md +++ b/README.md @@ -306,18 +306,33 @@ done Given no limit progress is printed as text only. ```bash -find / -type d 2> /dev/null | gum progress -f '{Iter} ~ {Elapsed}' --show-output > /tmp/dump.txt +find / -type d 2> /dev/null | gum progress --show-output > /tmp/dump.txt ``` Use a custom format. ```bash -find / -type d 2> /dev/null | gum progress -f '{Iter} ~ {Elapsed}' --show-output > /tmp/dump.txt +find / -type d 2> /dev/null | gum progress -f '{Iter} ~ {Elapsed}' -o > /tmp/dump.txt ``` -**Note:** when using a --progress-indicator != '\n' (the default) and showing the -output in the terminal (using -o/--output and not piped to a different process) -the lines will still be printed line wise even if the --progress-indicator is -different. This has no influence on the measurement of progress! +Using a different progress indicator + +```bash +{ + sleep 2s + echo ":step:Long process 1 completed" + + sleep 2s + echo ":step:Long process 2 completed" + + sleep 2s + echo ":step:Long process 3 completed" +} | gum progress -l 3 --progress-indicator ':step:' -o --hide-progress-indicator +``` + +**Note:** when using a --progress-indicator != '\n' (the default) with output +going to the terminal (using -o/--output not piped) +the lines will still be printed line wise. This has no influence on the +measurement of progress! #### Spin