Skip to content

Commit aa79e59

Browse files
authored
cli: set click_types.Path for -r and -e options (#5352)
* cli: set click_types.Path for -r and -e options this enables click to generate shell auto completions for files/paths see #3478 * added news fragment for PR 5352
1 parent 7ef550a commit aa79e59

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

news/5352.trivial.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
emit file-based shell completions for -r and -e options

pipenv/cli/options.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def callback(ctx, param, value):
127127
expose_value=False,
128128
multiple=True,
129129
callback=callback,
130-
type=click_types.STRING,
130+
type=click_types.Path(file_okay=False),
131131
help="An editable Python package URL or path, often to a VCS repository.",
132132
)(f)
133133

@@ -460,7 +460,7 @@ def callback(ctx, param, value):
460460
expose_value=False,
461461
help="Import a requirements.txt file.",
462462
callback=callback,
463-
type=click_types.STRING,
463+
type=click_types.Path(dir_okay=False),
464464
)(f)
465465

466466

0 commit comments

Comments
 (0)