FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add completions for CLI by lewisacidic · Pull Request #1118 · pre-commit/pre-commit · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cfg  (1) .py  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 5 additions & 0 deletions pre_commit/main.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import os
import sys

import argcomplete

import pre_commit.constants as C
from pre_commit import color
from pre_commit import five
Expand Down Expand Up @@ -268,6 +270,9 @@ def main(argv=None):
# argparse doesn't really provide a way to use a `default` subparser
if len(argv) == 0:
argv = ['run']

argcomplete.autocomplete(parser)

args = parser.parse_args(argv)

if args.command == 'help' and args.help_cmd:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ install_requires =
virtualenv>=15.2
futures; python_version<"3.2"
importlib-resources; python_version<"3.7"
argcomplete
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

[options.entry_points]
Expand Down

Back | FazBrowse Home | New Git URL