|
1 | 1 | use clap::Parser; |
2 | 2 | use clap_complete::Shell; |
| 3 | +use indoc::indoc; |
3 | 4 |
|
4 | 5 | #[derive(Parser)] |
5 | 6 | #[command( |
6 | 7 | name = "wpush", |
7 | 8 | about = "Clone a repo on Windows, push it into WSL", |
8 | | - long_about = r#"wpush - Windows to WSL Repository Pusher |
| 9 | + long_about = indoc! {r#" |
| 10 | + wpush - Windows to WSL Repository Pusher |
9 | 11 |
|
10 | | -Clone any Git repository on Windows side, then seamlessly push it into your WSL filesystem. |
| 12 | + Clone any Git repository on Windows side, then seamlessly push it into your WSL filesystem. |
11 | 13 |
|
12 | | -FEATURES: |
13 | | - • Git-style progress bars with color output |
14 | | - • Automatic WSL username detection |
15 | | - • Support for ~ (tilde) expansion in paths |
16 | | - • Branch selection |
17 | | - • Multi-distro support |
18 | | - • Option to preserve Git history (--keep-git / -k) |
| 14 | + FEATURES: |
| 15 | + • Git-style progress bars with color output |
| 16 | + • Automatic WSL username detection |
| 17 | + • Support for ~ (tilde) expansion in paths |
| 18 | + • Branch selection |
| 19 | + • Multi-distro support |
| 20 | + • Option to preserve Git history (--keep-git / -k) |
19 | 21 |
|
20 | | -DESTINATION PATH FORMATS: |
21 | | - ~/project Expands to /home/<username>/project (auto-detects user) |
22 | | - ~ Expands to /home/<username> |
23 | | - /home/user/project Used as-is (absolute path) |
| 22 | + DESTINATION PATH FORMATS: |
| 23 | + ~/project Expands to /home/<username>/project (auto-detects user) |
| 24 | + ~ Expands to /home/<username> |
| 25 | + /home/user/project Used as-is (absolute path) |
24 | 26 |
|
25 | | -EXAMPLES: |
26 | | - # Clone to auto-detected user's home (without .git) |
27 | | - wpush https://github.com/user/repo.git ~/project |
| 27 | + EXAMPLES: |
| 28 | + # Clone to auto-detected user's home (without .git) |
| 29 | + wpush https://github.com/user/repo.git ~/project |
28 | 30 |
|
29 | | - # Clone with full Git history |
30 | | - wpush https://github.com/user/repo.git ~/project --keep-git |
| 31 | + # Clone with full Git history |
| 32 | + wpush https://github.com/user/repo.git ~/project --keep-git |
31 | 33 |
|
32 | | - # Clone with specific branch |
33 | | - wpush https://github.com/user/repo.git ~/project -b develop |
| 34 | + # Clone with specific branch |
| 35 | + wpush https://github.com/user/repo.git ~/project -b develop |
34 | 36 |
|
35 | | - # Clone to a different WSL distro |
36 | | - wpush https://github.com/user/repo.git ~/project --distro Debian |
| 37 | + # Clone to a different WSL distro |
| 38 | + wpush https://github.com/user/repo.git ~/project --distro Debian |
37 | 39 |
|
38 | | - # Clone with a specific user |
39 | | - wpush https://github.com/user/repo.git ~/project --user root |
| 40 | + # Clone with a specific user |
| 41 | + wpush https://github.com/user/repo.git ~/project --user root |
40 | 42 |
|
41 | | - # Clone to an absolute path |
42 | | - wpush https://github.com/user/repo.git /home/cero/projects/repo |
| 43 | + # Clone to an absolute path |
| 44 | + wpush https://github.com/user/repo.git /home/cero/projects/repo |
43 | 45 |
|
44 | | -ENVIRONMENT VARIABLES: |
45 | | - WSL_DISTRO Default WSL distro (overridden by --distro) |
46 | | -"#, |
| 46 | + ENVIRONMENT VARIABLES: |
| 47 | + WSL_DISTRO Default WSL distro (overridden by --distro) |
| 48 | + "#}, |
47 | 49 | version = env!("CARGO_PKG_VERSION"), |
48 | 50 | author |
49 | 51 | )] |
|
0 commit comments