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.

45 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
175 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
68 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
766 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
462 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
57 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
1answer
257 views

Prevent bash-completion adding an extra space when the word is incomplete

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 ...
2
votes
0answers
91 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
149 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
44 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
114 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
76 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
137 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
39 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
332 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
35 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
40 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
396 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
112 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
272 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
254 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
136 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
225 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
49 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
118 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
26 views

Emacs shell slow compile

So I've been searching around for this particular problem and apparently I found no solutions. There are posts on reddit about this: https://www.reddit.com/r/emacs/comments/3scsak/...
0
votes
0answers
11 views

(comint-magic-space) in Eshell

I like to interact with the history of my bash commands. For instance, !?python would run the last command that contains python. Since the outcome is quite unpredictable, I often expand it before ...
0
votes
0answers
18 views

Is there a way to speed up emac's “shell” mode?

I am new to emacs. I know we can open a shell, eshell, or term with M-x shell, M-x eshell and M-x term. I have a program that needs to run make then run. On an external terminal app, I am on XFCE so ...
0
votes
0answers
15 views

In a terminal (not in Emacs), how can I use emacs helm/swipe to choose old shell command from bash_history?

In a terminal, we can use C-r to search a command from bash_history, but it is far less powerful than the Emacs package like helm-swoop or ivy-swipe. How can I use a shortcut in terminal (e.g., C-r) ...
0
votes
1answer
22 views

Emacs / Projectile complains about no job control with Bash/terminal

I use Emacs 27.0.50 on Ubuntu 18.04. Fish is my default shell. When a file from a directory with .git is being loaded into the buffer, I'm trying to start projectile-find-file , I see the following ...
0
votes
0answers
36 views

How do I generate a swiper like list from a custom input?

I need help with creating a tool. So I have some lines selected by a region, that I need to feed line by line to a shell/python script. The output of shell/python script will be of the form: 0xabcd ...
0
votes
1answer
18 views

always prompt for default directory when opening interactive subshell

When I invoke C-u M-x shell while visiting a local file or scratch buffer, emacs does not prompt me to enter the default directory for the shell. But if I'm visiting a remote file or directory ...
0
votes
0answers
60 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
60 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
43 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
72 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
22 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
2answers
86 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 ...
0
votes
0answers
27 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
75 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
61 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
179 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 ...