Skip to content

purcell/term-run-el

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

term-run.el

Run arbitrary command in a terminal buffer.

Originally Emacs provide M-x term function, which uses term-mode and works as a terminal-emulator. It can be used to run shell programs like bash, zsh or ipython interactively. However, this function does not provide the feature to invoke programs with arguments.

Here comes term-run, which provides functions to invoke arbitrary commands in terminal buffers. For example, you can run git command with any arguments in terminal buffer directly (without running bash with M-x term first). Try typing M-x term-run-shell-command RET git add -p RET !

Usage

  • term-run-shell-command (command &optional new-buffer-p)

    Run COMMAND in a terminal buffer.

    This function is intended mainly to be called interactively and asks the command-line to invoke.

    If called with prefix argument, this function will generate new terminal buffer for running COMMAND. Otherwise, always use the buffer named *Term-Run Shell Command*. In this case, the old process in the buffer will be destroyed.

  • term-run (program &optional buffer-or-name &rest args)

    Run PROGRAM in BUFFER-OR-NAME with ARGS in terminal buffer.

    If BUFFER-OR-NAME is given, use this buffer. In this case, old process in the buffer will be destroyed. Otherwise, new buffer will be generated automatically from PROGRAM.

    This function returns the buffer where the process starts running.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

See LICENSE for details.

About

Run Arbitrary Command in Terminal Buffer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 88.2%
  • Makefile 11.8%