Skip to content

Commit 71e2296

Browse files
TeleuiopTeleuiop
authored andcommitted
wow
1 parent 14083c2 commit 71e2296

2 files changed

Lines changed: 32 additions & 29 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ tempfile = "3.10"
1717
anyhow = "1.0"
1818
git2 = "0.20.4"
1919
colored = "3.1.1"
20+
indoc = "2.0.7"
2021

2122
[[bin]]
2223
name = "wpush"

src/wpush.rs

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
11
use clap::Parser;
22
use clap_complete::Shell;
3+
use indoc::indoc;
34

45
#[derive(Parser)]
56
#[command(
67
name = "wpush",
78
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
911
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.
1113
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)
1921
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)
2426
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
2830
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
3133
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
3436
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
3739
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
4042
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
4345
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+
"#},
4749
version = env!("CARGO_PKG_VERSION"),
4850
author
4951
)]

0 commit comments

Comments
 (0)