Skip to content

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

Merged
wbolster merged 1 commit into
wbolster:mainfrom
spookylukey:use-read-shell-command
May 2, 2022
Merged

Use read-shell-command instead of read-from-minibuffer#60
wbolster merged 1 commit into
wbolster:mainfrom
spookylukey:use-read-shell-command

Conversation

@spookylukey
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants