Skip to content
Myr

Add aliases, change help text

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent caad43f · Browse files · 2 files+21 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+21 added−11 removed

  • tests:+2 added−2 removed
  • other:+19 added−9 removed

2 files+21 added−11 removed

modified:src/app.rs+19 added-9 removed
170 unmodified lines
171 )172 .arg(173 arg("changed-within")174 .long("changed-within")175 .alias("change-newer-than")176 .takes_value(true)177 .value_name("date|dur")178 .number_of_values(1),179 )180 .arg(181 arg("changed-before")182 .long("changed-before")183 .alias("change-older-than")184 .takes_value(true)185 .value_name("date|dur")186 .number_of_values(1),187 )188 .arg(arg("show-errors").long("show-errors"))189 .arg(arg("pattern"))
126 unmodified lines
316 'ki': kibibytes\n \317 'mi': mebibytes\n \318 'gi': gibibytes\n \319 'ti': tebibytes");316 doc!(h, "changed-before"317 , "Limit results based on modification time older than duration or date provided."318 , "Limit results based on modification time older than duration provided:\n \319 using a duration: <NUM>d <NUM>h <NUM>m <NUM>s (e.g. 10h, 1d, 35min...)\n \320 or a date and time: YYYY-MM-DD HH:MM:SS");320 doc!(h, "changed-within"322 , "Limit results based on modification time within the duration provided or between date provided and now."323 , "Limit results based on modification time within the duration provided:\n \324 using a duration: <NUM>d <NUM>h <NUM>m <NUM>s (e.g. 10h, 1d, 35min...)\n \325 or a date and time: YYYY-MM-DD HH:MM:SS");321 , "Filter by file modification time (newer than)"322 , "Filter results based on the file modification time. The argument can be provided \323 as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \324 '--change-newer-than' can be used as an alias.\n\325 Examples:\n \326 --changed-within 2weeks\n \327 --change-newer-than '2018-10-27 10:00:00'");328 doc!(h, "changed-before"329 , "Filter by file modification time (older than)"330 , "Filter results based on the file modification time. The argument can be provided \331 as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \332 '--change-older-than' can be used as an alias.\n\333 Examples:\n \334 --changed-before '2018-10-27 10:00:00'\n \335 --change-older-than 2weeks");336 doc!(h, "show-errors"337 , "Enable display of filesystem errors"338 , "Enable the display of filesystem errors for situations such as insufficient permissions \339 or dead symlinks.");
6 unmodified lines
modified:tests/tests.rs+2 added-2 removed
1138 unmodified lines
1139 foo_10_min",1140 );11411142 te.assert_output(1143 &["", "--changed-before", "15min"],1143 &["", "--change-older-than", "15min"],1144 "bar_1_h1145 foo_2_h1146 bar_1_day",1147 );
19 unmodified lines
1167 change_file_modified(te.test_root().join("15mar2018"), "2018-03-15T12:00:00Z");1168 change_file_modified(te.test_root().join("30dec2017"), "2017-12-30T23:59:00Z");11691170 te.assert_output(1171 &["", "--changed-within", "2018-01-01 00:00:00"],1171 &["", "--change-newer-than", "2018-01-01 00:00:00"],1172 "15mar2018",1173 );1174 te.assert_output(1175 &["", "--changed-before", "2018-01-01 00:00:00"],
3 unmodified lines