Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/ntfy/cli.py b/ntfy/cli.py | ||
index 7dad0b2..d1b2b36 100644 | ||
--- a/ntfy/cli.py | ||
+++ b/ntfy/cli.py | ||
@@ -26,6 +26,11 @@ try: | ||
except ImportError: | ||
psutil = None | ||
|
||
+try: | ||
+ import argcomplete | ||
+except ImportError: | ||
+ argcomplete = None | ||
+ | ||
try: | ||
from .terminal import is_focused | ||
except ImportError: | ||
@@ -294,6 +299,8 @@ shell_integration_parser.set_defaults(func=auto_done) | ||
|
||
|
||
def main(cli_args=None): | ||
+ if argcomplete is not None: | ||
+ argcomplete.autocomplete(parser) | ||
if cli_args is not None: | ||
args = parser.parse_args(cli_args) | ||
else: | ||
diff --git a/setup.py b/setup.py | ||
index 13172e3..e825bfe 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -1,3 +1,4 @@ | ||
+# PYTHON_ARGCOMPLETE_OK | ||
from sys import version_info | ||
|
||
from setuptools import find_packages, setup |
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# PYTHON_ARGCOMPLETE_OK | ||
from sys import version_info | ||
|
||
from setuptools import find_packages, setup | ||
|