Skip to content

Commit df22097

Browse files
committed
cli: Add examples to default help
1 parent 9f02567 commit df22097

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/vcspull/cli/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
import argparse
88
import logging
9+
import textwrap
910

1011
from libvcs.__about__ import __version__ as libvcs_version
1112

@@ -17,7 +18,22 @@
1718

1819

1920
def create_parser():
20-
parser = argparse.ArgumentParser(prog="vcspull")
21+
parser = argparse.ArgumentParser(
22+
prog="vcspull",
23+
formatter_class=argparse.RawDescriptionHelpFormatter,
24+
description=textwrap.dedent(
25+
"""
26+
sync vcspull repos
27+
28+
examples:
29+
vcspull sync "*"
30+
vcspull sync "django-*"
31+
vcspull sync "django-*" flask
32+
vcspull sync -c "myrepos.yaml" "*"
33+
vcspull sync -c "myrepos.yaml" myproject
34+
"""
35+
).strip(),
36+
)
2137
parser.add_argument(
2238
"--version",
2339
"-V",

0 commit comments

Comments
 (0)