Issue #369 resolved

evil-shell-command without ex range puts output in current buffer instead of shell output buffer

Anonymous created an issue

Using git revision 75946082, when evil-shell-command is called with ! in ex mode, the output of the command is put into the current buffer. This is different from Vim, where the output is dumped to the calling shell, and also different from Emacs M-x shell-command, which puts its output in a new buffer *Shell Command Output*.

Steps to reproduce:

  1. Open buffer.
  2. Run :!echo hello world.

Expected behavior:

  • Open new buffer and put shell command output there.

Actual behavior:

  • Dump output of shell command into current buffer.

Comments (3)

  1. Frank Fischer repo owner

    fix evil-shell-command in ex-state with empty range (fix #369)

    The default range passed to an ex-command is the current line. Therefore, checking the parameters beg and end is not appropriate for deciding whether the current ex-range is empty. We must check the variable evil-ex-range instead.

    → <<cset 11662a1b6c25>>

  2. Frank Fischer repo owner

    fix evil-shell-command in ex-state with empty range (fix #369)

    The default range passed to an ex-command is the current line. Therefore, checking the parameters beg and end is not appropriate for deciding whether the current ex-range is empty. We must check the variable evil-ex-range instead.

    → <<cset 11662a1b6c25>>

  3. Log in to comment