Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shell]

Questions relating to commands for passing single command lines to shell sub-processes, running a shell interactively with input and output to an Emacs buffer, and for running a shell in a terminal emulator window.

0
votes
2answers
76 views

Break (C-c C-c) in ESS-remote R shell

I am running my R scripts on a remote shell using M-x shell ssh -X -C name@server.edu srun -p nodeX --pty R (slurm command to start R) M-x ess-remote and select 'R' everythink works fine, until I ...
2
votes
1answer
229 views

How to prevent the completion feature of Emacs shell from adding an extra space after the first word of a command?

When using Emacs shell with the auto-completion feature enabled, I notice that whenever I perform typing and auto-completing a command, Emacs shell always adds an extra space after the first word. I ...
3
votes
0answers
60 views

Switch between term and shell keeping directory

I am a beginner user of emacs so please answer being aware of this. I use dired to connect to a remote computer and navigate directories. I sometimes want to go to a shell or terminal on the remote ...
3
votes
0answers
153 views

Shell coding system

If, before M-x shell, I run C-x RET c (universal-coding-system-argument) I can change the coding system used by the shell. Therefore, given echo Straße > foo foo will be encoded in the related ...
3
votes
0answers
740 views

How to get Powerline colours working in Emacs Shell/Term mode?

I have recently started using Spacemacs instead of VIM, because of great VHDL mode. In vim (neovim) I used to use VIM as terminal emulator. In Emacs I have encountered a bit of strange colour ...
3
votes
0answers
440 views

FZF broken displaying in emacs terminal

I'm struggling to run fzf in emacs but cannot figure out whats my problem. When I run fzf - and start typing - text gets mess up, similar to this: I tried run fzf in term, eshell, ansi-term, multi-...
2
votes
0answers
53 views

How to run process in administrative mode from Emacs?

I've been using powershell.el in MS Windows Emacs, but I sometimes want to be administrative mode so that I can do software installation via chocolatey, etc. Is there any way to call shell command, ...
2
votes
0answers
84 views

Emacs shell and telnet buffer auto jumps to end of buffer while browsing buffer contents

Was recently required to update to RHEL 7.x and with that came a newer release of Emacs (24.3.1). With emacs I am a big user of shells and telnet sessions within emacs so that I can easily browse the ...
2
votes
0answers
74 views

Evaluation of .dir-locals.el in shell?

I observed that directory local variables, defined in .dir-locals.el, are set for files, dired-buffers, new buffers, but not for shell or eshell buffers (well, that is also the case for buffers ...
2
votes
0answers
148 views

Basic process management under Windows

I've got the following elisp: (setq proc (start-process "powershell" "*powershell*" "powershell.exe")) Unfortunately, I can't seem to get proc to do anything. For instance, in an normal shell, I ...
1
vote
0answers
37 views

Associate a buffer with a process

I am using Python with elpy. I am trying to use a Python shell opened on the remote computer using a shell buffer. I can cheat elpy by renaming the shell buffer with Python running in it to *Python*. ...
1
vote
0answers
80 views

Can't run Windows 10 Bash with ansi-term

I've got this error, when running M-x ansi-term C:/Windows/System32/bash.exe RET Spawning child process: invalid argument after running M-x debug-on-entry RET start-process RET when running M-x ...
1
vote
0answers
64 views

How to mount/unmount devices?

I'm interested in mount/umount usb and other devices directly from emacs. In many file mangers (like nautilus) the devices are automatically discovered and indicated with an icon, it's possible to do ...
1
vote
0answers
119 views

Multi-term issue with line wrapping for shell but not applications

I use multi-term within spacemacs for most of my command-line operations. It works well except some annoying behavior in the shell prompt (zsh but similar for bash) on commands which go over the ...
1
vote
0answers
31 views

Why in shell mode not show row/column number in mode line?

Emacs 26.1 I use smart mode line https://github.com/Malabarba/smart-mode-line. Here result: As you can see in scratch buffer show row/column numbers. But in shell mode not. Why? How I can fix this?
1
vote
0answers
303 views

From Org code block on *nix run (Power-)Shell (scripts) on MS Windows via SSH

To better integrate my Windows DevOps into Emacs Org-mode, I'd like to use my local emacs as an IDE for a remote Powershell. SSH was easily setup, from Linux shell ssh I can successfully login to a ...
1
vote
0answers
33 views

Terminfo database in Emacs shell not updated after (text-scale-adjust)

The following sequence of commands shows that the number of columns in terminfo's database inside an Emacs shell buffer is not updated when the user decreases the size of the font with "C-x C--" (text-...
1
vote
0answers
39 views

how can I see the result of 'ping -c 5 127.0.0.1' live using org babel session

https://github.com/whacked/ob-shstream/blob/master/ob-shstream.el There's an add-on for org babel that let's you see streaming output of bash shell blocks. It's documentation reads like this: ;; the ...
1
vote
0answers
376 views

Including pip-installed libraries on emacs python shell

I recently found out you can run python from emacs (Python Mode -> py-shell) and I've been running my scripts through the py-shell due to only needing to C-c C-c, but I've been running into a problem: ...
1
vote
0answers
108 views

`pushd` command for shell buffer

In an interactive shell, I have a script I run that changes my directory (via pushd) and then launches an interactive program. At this point I issue M-x cd and provide Emacs with the new directory ...
1
vote
0answers
254 views

ansi-term changes in line-mode not registered after char-mode

Here's the situation. I start M-x ansi-term, which launches it in term-char-mode. I type the following: echo "hello world" and press RET, which outputs on the next line the expected output hello ...
1
vote
0answers
43 views

Since when the M-x shell open the shell on the other buffer?

I recently noticed the M-x shell command opens the shell in the other buffer. I used to do Ctrl-x 3 > Ctrl-x o > M-x shell. But recently I found that M-x shell opens the shell in the other buffer. ...
1
vote
0answers
243 views

byte-recompilation of files under a directory

As I move all my emacs.d between my machines using Git, and, obviously, I don’t version control byte-compiled files (*.elc), I sometimes get into a situation when my .el files are newer then the ...
1
vote
0answers
129 views

How to enable control character (e.g. carriage return) handling in emacs shell

I run compilation processes that, in a terminal, list what was built all on the same line. In emacs shell they are all on separate lines, filling my shell buffer with unwanted output. I realize I ...
1
vote
0answers
215 views

Send Python Buffer to ansi-term

I recently started using emacs to code in Python. I currently prefer to use python mode (defined in python.el) alongside ansi-term for the python interactive shell. I'm trying to change the behavior ...
1
vote
0answers
47 views

Can I have a separate shell switch when compiling?

Whenever I use M-x compile, I like to have the shell that's running to be configured with bash -ic so that I can easily type the compilation command (I switch between languages often, so the building ...
1
vote
0answers
117 views

How to make dired-do-async-shell-command wait for all sub processes to finish

I'm trying to run the bash script, ~/bin/xlda, ... #!/bin/sh # ~/bin/xlda old_filename="$1" new_filename=`echo $old_filename | sed 's/\(.*\.\)flac/\1m4a/'` ~/bin/xld -f alac -o "$new_filename" "$...
0
votes
0answers
46 views

How to execute a shell script inside of emacs?

I simply want to execute the whole file I am editing right now in a small shell buffer just like I can run my python script. How can I do this?
0
votes
0answers
45 views

after connecting ssh in multi-term, prompt is messed up

After connecting ssh in emacs multi-term, prompt is repeated. How can I remove repeated prompt? I'm using OS X, OS X Terminal works well. It's only problem in emacs multi-term.
0
votes
0answers
34 views

Enter not sent to bash in shell buffer on Windows

I've asked this question: Emacs opens gitbash in new system window the solution make git bash run on windows but prompt was not read only. I've applied this solution Any way to make prompts and ...
0
votes
0answers
66 views

Run custom bash functions with M-!

I have a few custom bash functions that are defined is some file and are made available to me in regular terminals via the line . "/path/Custom Bash Functions.sh" in my ~/.bashrc. However, Emacs ...
0
votes
0answers
23 views

shell: comint-dynamic-list-input-ring interactively in ido mode?

windows 10, emacs 26.1 M-x shell Press C-c C-l run command "commint-dynamic-list-input-ring" and as result show Possible history references: in the *Input History* buffer. OK. But it's very slow. ...
0
votes
0answers
17 views

helm-comint-input-ring - get error: shell-mode-map

windows 10, emacs 26.1, helm 3.0 I use C-c C-l (comint-dynamic-list-input-ring) I get something like this: But I don't like this. I want to use helm-comint-input-ring. I want to get something like ...
0
votes
0answers
26 views

How narrow shell output?

Emacs 25.1. I start M-x shell. And run some process that generate text to output. How can I filter this output?
0
votes
0answers
71 views

shell-mode C-c C-c kill keybinding

With some regularity, I am using bash with M-x shell, and out of muscle memory I hit C-c C-c, with dramatic results: the comint prompt streams a long error message with a large number of escaped ...
0
votes
0answers
58 views

Retaining focus while displaying graphics windows

NB: The Emacs world uses the word frame to refer to what in most other contexts is called window, and uses the word window to describe something else. In this post, however, the word window always ...
0
votes
0answers
26 views

dired function i wrote passes only current marked folder at point, can i send all marked folder?

i have this simple function i wrote (tbh i have zero coding skills.i gathered stuff from the web :)): (defun z/dired-media-filebot (file) (interactive (list (expand-file-name (dired-file-name-at-...
0
votes
0answers
173 views

Incorrect Line Spacing in (term-mode, ansi-term, eshell, shell) Output

The output of certain commands in multiple major modes (term-mode, ansi-term, shell, eshell) is incorrectly spaced (see images). This occurs for numerous commands and does not occur in other emulators ...