Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use read-shell-command instead of read-from-minibuffer #60

Merged
merged 1 commit into from May 2, 2022

Conversation

spookylukey
Copy link
Contributor

@spookylukey spookylukey commented May 2, 2022

…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).

I've tested and everything else seems to work the same, which is what you'd expect from the docs:

read-shell-command is a compiled Lisp function in ‘simple.el’.

(read-shell-command PROMPT &optional INITIAL-CONTENTS HIST &rest ARGS)

Read a shell command from the minibuffer.
The arguments are the same as the ones of ‘read-from-minibuffer’,
except READ and KEYMAP are missing and HIST defaults
to ‘shell-command-history’.

In our case we are still passing HIST explicitly so that bit makes no difference.

Thanks again for the package, I'm using it every day!

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)
@wbolster
Copy link
Owner

wbolster commented May 2, 2022

this makes total sense; lgtm 🚀

@wbolster wbolster changed the title Use read-shell-command instead of read-from-minibuffer when prompting for pytest command Use read-shell-command instead of read-from-minibuffer (#60) May 2, 2022
@wbolster wbolster merged commit 5e72c34 into wbolster:main May 2, 2022
@wbolster wbolster changed the title Use read-shell-command instead of read-from-minibuffer (#60) Use read-shell-command instead of read-from-minibuffer May 2, 2022
@wbolster wbolster self-assigned this May 2, 2022
@wbolster wbolster added the enhancement New feature or request label May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants