https://github.com/10sr/term-run-el
Run Arbitrary Command in Terminal Buffer
https://github.com/10sr/term-run-el
Last synced: over 1 year ago
JSON representation
Run Arbitrary Command in Terminal Buffer
- Host: GitHub
- URL: https://github.com/10sr/term-run-el
- Owner: 10sr
- License: gpl-3.0
- Created: 2015-02-16T13:41:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-01-28T07:03:25.000Z (over 6 years ago)
- Last Synced: 2025-01-16T09:08:01.779Z (over 1 year ago)
- Language: Emacs Lisp
- Homepage: http://10sr.github.io/term-run-el/
- Size: 37.1 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/10sr/term-run-el)
[](http://stable.melpa.org/#/term-run)
[](http://melpa.org/#/term-run)
term-run.el
===========
Run arbitrary command in a terminal buffer.
Currently Emacs provide `M-x term`, which uses `term-mode`
and works as a terminal-emulator.
It is useful 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 `ssh` 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 ssh git@github.com 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 .
See `LICENSE` for details.