Skip to content

Commit

Permalink
Use read-shell-command instead of read-from-minibuffer (#60)
Browse files Browse the repository at this point in the history
…when prompting for pytest command when prompting for pytest command.

The primary advantage of this is that tab completion completes from files in
the CWD, which is much more useful for pytest (where test files are valid
arguments).
  • Loading branch information
spookylukey authored May 2, 2022
1 parent 08df213 commit 5e72c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python-pytest.el
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ With a prefix ARG, allow editing."
(setq edit (not edit)))
(when edit
(setq command
(read-from-minibuffer
(read-shell-command
"Command: "
command nil nil 'python-pytest--history)))
command 'python-pytest--history)))
(add-to-history 'python-pytest--history command)
(setq python-pytest--history (-uniq python-pytest--history))
(puthash (python-pytest--project-root) command
Expand Down

0 comments on commit 5e72c34

Please sign in to comment.