Commit Graph

8 Commits

Author SHA1 Message Date
Sami Kerola 6b62a608b2
bash-completion: update script, scriptlive, and scriptreplay files
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2019-12-11 19:19:21 +00:00
Karel Zak 0faa7eda04 bash-completion: update for new script tools
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-11-25 12:49:48 +01:00
Sami Kerola 5feae697b0
bash-completion: catch up with option changes
Check what has changed in usage functions in between v2.32..a77bd80d5 and
update bash-completion files accordingly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-10-04 21:36:22 +01:00
Fred Mora aefe989338 script: add the -o/--output-limit option. Fix race test.
When script is used on a host with a relatively small free disk space, it
is sometimes desirable to limit the size of the captured output. This
can now be enforced with the --output-limit option.

The --output-limit option lets the user specify a maximum size. The program
uses the size parsing from strutils and thus supports the usual
multiplicative suffixes (kiB, KB, MiB, MB, etc.). After the specified
number of bytes have been written to the output file, the script program
will terminate the child process.

Due to buffering, the size of the output file might exceed the specified
limit. This limit also does not include the start and done messages.

The race test was throwing an error dur to a variable being "" in some cases.
Quoting the variable in the equal test took care of that test.

[kzak@redhat.com: - use done() to stop script
                  - count also timing file
                  - remove unnamed member initialization in ctl struct
                  - add to bash-completion]

Signed-off-by: Fred Mora <fmora@datto.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 11:32:23 +02:00
Karel Zak ce3e6b15e2 bash-completion: use '\n' as IFS when ask for filenames
The bash completion for more(1) treats the space-separated pieces of
filenames as different files.

	$ touch foo\ bar
	$ more foo<TAB>
	bar foo

Reported-by: Ángel González <ingenit@zoho.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-30 15:49:00 +02:00
Ville Skyttä 0d5b9b8ab1 bash-completion: Don't offer short options where corresponding long one exists.
Users who know the short options can just hit the short option instead
of tab, and it's not likely that it would be helpful to present a list
of single character options to users who don't know them, doing so
just unnecessarily trashes the list of suggestions.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2013-04-08 17:06:56 +02:00
Ville Skyttä d4f9b8d74c bash-completion: Don't offer any more completions after help or version.
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2013-04-08 17:06:52 +02:00
Karel Zak 20da58084a bash-completion: rename shell-completion -> bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 14:58:07 +02:00