|
484 | 484 | <a href="#484" id="484">484</a>
|
485 | 485 | <a href="#485" id="485">485</a>
|
486 | 486 | <a href="#486" id="486">486</a>
|
487 |
| -<a href="#487" id="487">487</a> |
488 |
| -<a href="#488" id="488">488</a> |
489 |
| -<a href="#489" id="489">489</a> |
490 |
| -<a href="#490" id="490">490</a> |
491 |
| -<a href="#491" id="491">491</a> |
492 |
| -<a href="#492" id="492">492</a> |
493 | 487 | </pre><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
|
494 | 488 | // *
|
495 | 489 | // * (c) Joseph Crail <jbcrail@gmail.com>
|
|
577 | 571 | </span>}
|
578 | 572 | }
|
579 | 573 |
|
580 |
| -<span class="kw">fn </span>long_usage() -> String { |
581 |
| - String::from( |
582 |
| - <span class="string">" In the 1st form, create a link to TARGET with the name LINK_NAME. |
583 |
| - In the 2nd form, create a link to TARGET in the current directory. |
584 |
| - In the 3rd and 4th forms, create links to each TARGET in DIRECTORY. |
585 |
| - Create hard links by default, symbolic links with --symbolic. |
586 |
| - By default, each destination (name of new link) should not already exist. |
587 |
| - When creating hard links, each TARGET must exist. Symbolic links |
588 |
| - can hold arbitrary text; if later resolved, a relative link is |
589 |
| - interpreted in relation to its parent directory. |
590 |
| - "</span>, |
591 |
| - ) |
592 |
| -} |
593 |
| - |
594 |
| -<span class="kw">static </span>ABOUT: <span class="kw-2">&</span>str = <span class="string">"Change file owner and group"</span>; |
| 574 | +<span class="kw">const </span>ABOUT: <span class="kw-2">&</span>str = <span class="string">"Change file owner and group"</span>; |
595 | 575 | <span class="kw">const </span>USAGE: <span class="kw-2">&</span>str = <span class="string">"\
|
596 |
| - {} [OPTION]... [-T] TARGET LINK_NAME |
597 |
| - {} [OPTION]... TARGET |
598 |
| - {} [OPTION]... TARGET... DIRECTORY |
599 |
| - {} [OPTION]... -t DIRECTORY TARGET..."</span>; |
| 576 | + {} [OPTION]... [-T] TARGET LINK_NAME |
| 577 | + {} [OPTION]... TARGET |
| 578 | + {} [OPTION]... TARGET... DIRECTORY |
| 579 | + {} [OPTION]... -t DIRECTORY TARGET..."</span>; |
| 580 | +<span class="kw">const </span>LONG_USAGE: <span class="kw-2">&</span>str = <span class="string">"\ |
| 581 | + In the 1st form, create a link to TARGET with the name LINK_NAME.\n\ |
| 582 | + In the 2nd form, create a link to TARGET in the current directory.\n\ |
| 583 | + In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.\n\ |
| 584 | + Create hard links by default, symbolic links with --symbolic.\n\ |
| 585 | + By default, each destination (name of new link) should not already exist.\n\ |
| 586 | + When creating hard links, each TARGET must exist. Symbolic links\n\ |
| 587 | + can hold arbitrary text; if later resolved, a relative link is\n\ |
| 588 | + interpreted in relation to its parent directory."</span>; |
600 | 589 |
|
601 | 590 | <span class="kw">mod </span>options {
|
602 | 591 | <span class="kw">pub const </span>FORCE: <span class="kw-2">&</span>str = <span class="string">"force"</span>;
|
|
616 | 605 |
|
617 | 606 | <span class="attr">#[uucore::main]
|
618 | 607 | </span><span class="kw">pub fn </span>uumain(args: <span class="kw">impl </span>uucore::Args) -> UResult<()> {
|
619 |
| - <span class="comment">// clap requires a 'static string |
620 |
| - </span><span class="kw">let </span>long_usage = <span class="macro">format!</span>( |
621 |
| - <span class="string">"{}\n{}"</span>, |
622 |
| - long_usage(), |
| 608 | + <span class="kw">let </span>long_usage = <span class="macro">format!</span>( |
| 609 | + <span class="string">"{}\n\n{}"</span>, |
| 610 | + LONG_USAGE, |
623 | 611 | backup_control::BACKUP_CONTROL_LONG_HELP
|
624 | 612 | );
|
625 | 613 |
|
|
0 commit comments