Skip to content

Commit ddb42ae

Browse files
committed
Merge pull request #1530 from rwp0/commands-file-pod
[doc] Rex::Commands::File: correct optional argument syntax
2 parents 19e2bcb + 447b465 commit ddb42ae

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Revision history for Rex
77
- Detect invalid hostgroup expressions
88

99
[DOCUMENTATION]
10+
- Clarify optional arguments of file commands
1011

1112
[ENHANCEMENTS]
1213

lib/Rex/Commands/File.pm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ use base qw(Rex::Exporter);
9797

9898
use vars qw(%file_handles);
9999

100-
=head2 template($file, @params)
100+
=head2 template($file [, %params])
101101
102102
Parse a template and return the content.
103103
@@ -290,7 +290,7 @@ sub _get_std_template_vars {
290290
return %template_vars;
291291
}
292292

293-
=head2 file($file_name, %options)
293+
=head2 file($file_name [, %options])
294294
295295
This function is the successor of I<install file>. Please use this function to upload files to your server.
296296
@@ -972,7 +972,7 @@ OUT:
972972
->report_resource_end( type => "delete_lines_matching", name => $file );
973973
}
974974

975-
=head2 delete_lines_according_to($search, $file, @options)
975+
=head2 delete_lines_according_to($search, $file [, @options])
976976
977977
This is the successor of the delete_lines_matching() function. This function also allows the usage of on_change and on_no_change hooks.
978978
@@ -1016,7 +1016,7 @@ sub delete_lines_according_to {
10161016

10171017
}
10181018

1019-
=head2 append_if_no_such_line($file, $new_line, @regexp)
1019+
=head2 append_if_no_such_line($file, $new_line [, @regexp])
10201020
10211021
Append $new_line to $file if none in @regexp is found. If no regexp is
10221022
supplied, the line is appended unless there is already an identical line
@@ -1047,7 +1047,7 @@ sub append_if_no_such_line {
10471047
_append_or_update( 'append_if_no_such_line', @_ );
10481048
}
10491049

1050-
=head2 append_or_amend_line($file, $line, @regexp)
1050+
=head2 append_or_amend_line($file, $line [, @regexp])
10511051
10521052
Similar to L<append_if_no_such_line>, but if the line in the regexp is
10531053
found, it will be updated. Otherwise, it will be appended.
@@ -1302,7 +1302,7 @@ sub extract {
13021302

13031303
}
13041304

1305-
=head2 sed($search, $replace, $file)
1305+
=head2 sed($search, $replace, $file [, %options])
13061306
13071307
Search some string in a file and replace it.
13081308

0 commit comments

Comments
 (0)