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]

The tag has no usage guidance.

0
votes
1answer
29 views

restrict shell command to only part of a line

In a file I'd like to replace some occurrences of triplets of 0 with F, 1 with E, ..., F with 0. Only some, so I can't just pipe the whole file through a bash tr filter; I need a text editor to ...
3
votes
3answers
73 views

Write buffer to command and append stdout back to same buffer

I've opened an empty buffer with just vim. I have a shell script in the same directory that I can pipe SQL to. That script will print the result of the execution to stdout. In my empty buffer, I ...
2
votes
1answer
63 views

get exit status from system() call

Calling the function system("<command>") or systemlist("<command>") retrieves the stdout output from a shell call to <command>. How can I retrieve the exit status of that command? ...
0
votes
1answer
49 views

what does “\033]110\007\033]111\007” mean

I found this snippet online which is apparently a way to make vim a little faster if your terminal background is the same as what vim's is meant to be (right?) " General colors if has('gui_running') |...
0
votes
1answer
72 views

How can I emulate :shell command in Neovim?

There is no :shell command in neovim. :terminal opens a shell without previous output, while :shell contains all the output of the parent shell and all previous shells. Is there any way to emulate :...
1
vote
1answer
27 views

Why does current/shell directory change depending whether drive-letter is used in filename?

Using VIM (v6.3) from a command-prompt (i.e. not gVIM) I'm getting different behaviour for the :shell command depending on whether I specify a drive-letter when editing a file or not. Without Driver ...
0
votes
2answers
69 views

Why is `vim -E` always exiting with non-zero exit code when using here-doc?

see the following session in dash: $ printf "foo\nbar\n" > testfile $ cat testfile foo bar $ vim -E testfile <<-EOS > 1 > s/foo/baz/ > x > EOS $ echo $? 1 $ cat testfile baz bar $...
0
votes
1answer
62 views

Weird characters when running :shell

When I run the :sh command I see the following characters If it is relevant, my default shell is zsh and it runs oh-my-zsh also Thanks
0
votes
2answers
57 views

Shell running inside vim windows

Is there a way that a open up a window or buffer, where i can run my bash commands? I thought on something like you know it from VS Code(1). The code windows on the top and a small command prompt on ...
1
vote
1answer
22 views

Retrieving results from variations of system('top') returns errors

Directly on the Ubuntu terminal, I can extract the results from top regarding a specific PID with: top -p <pid> -n1 | awk '/<pid>/' Where <pid> should be substituted with a PID ...
0
votes
1answer
36 views

Identifying the PID of Vim 8.1 internal terminal launched with :terminal ++close

When launching an internal Vim 8.1 terminal for an exclusive program like in terminal ++close ipython, is there a way to identify from vimscript which is the PID of the launched process (i.e. of the ...
0
votes
0answers
49 views

terminal shell behaves differently from normal shell

I run this command in a common terminal: $ ps aux | grep work | grep python | awk '{print $2}' Then I have three different pids, however, in the vim-term window, the same line gave me two pids. ...
2
votes
1answer
157 views

No color in Vim while using Google Cloud Shell

I am using the Google Cloud Shell and wanted to install a theme for Vim. Adding the following to my .vimrc (using vim-plug as a plugin manager): Plug 'mhartington/oceanic-next' syntax enable if (...
1
vote
1answer
250 views

Execute Vim commands from shell

How to execute Vim commands from shell? For ex I want to see man pages of grep command in vim typing command from shell(bash,zsh) command something like: vim ':Man grep' Is it possible?
0
votes
0answers
25 views

aliased commands don't work with the shell ex command? [duplicate]

I have a number of aliased commands in my .bashrc and they work fine on the command line. However, if I use them in Vim, they do not work. For example: :!mycommand results in: /binbash: mycommand: ...