The line-editor tag has no wiki summary.
0
votes
1answer
26 views
In tcsh shell how I find a particular word in the command prompt?
Suppose I have the following line in my command prompt and the cursor is at the and of the line or the beginning of the line by using (CTRL+A)
[subhrcho@slc04lyo pcbpel]$ abc def ghi jkl
How can I ...
3
votes
1answer
85 views
Where is the bash feature to open a command in $EDITOR documented?
I have recently discovered that if we press Ctrl+X Ctrl+E, bash opens the current command in an editor (set in $VISUAL or $EDITOR) and executes it when the editor is closed. But it doesen't seem to be ...
1
vote
1answer
52 views
How can I move between words in the command prompt in tcsh in linux?
I want a feature like vim's going forward or backwards command (w,e,ge,b) etc in the shell prompt. I am using tcsh shell in Linux. I would like to go 'n' number of words backs or forward etc and do ...
5
votes
1answer
44 views
can you make zsh autocorrect smarter?
I like zsh autocorrect, but it keeps asking me about things that don't need correcting.
dzil build
zsh: correct 'build' to '.build' [nyae]? %
.build is a directory created by the build (or any ...
1
vote
1answer
60 views
How can I clear portion of what is typed into the prompt while working on Linux and using C-shell?
I am working in Linux and C-shell. Often times I would require to change some portion of what is there already in the prompt that I obtain from reverse searching through the history command by use of ...
7
votes
1answer
92 views
The shell's “delete word” shortcut deletes too many characters
Under Bash some behavior of Alt+d has been driving me crazy since years and I figured out that maybe it could be fixed with a setting.
If I'm at a terminal and issue a command like this:
...$ cat ...
3
votes
1answer
108 views
How to input / start a new line in bash terminal?
I notice some sample bash for loops are spread out over multiple lines in examples
for VARIABLE in file1 file2 file3
do
command1 on $VARIABLE
command2
commandN
done
(eg here
...
2
votes
3answers
93 views
Shell: How do I get the last argument the previous command when it was detached?
Within the shell, typing ALT+. or using !$ recalls the last passed argument of the previous command. I use this all the time, but how do you do that when you detached the previous command?
$ ...
3
votes
1answer
83 views
Is there a command for switch to vicmd mode in zsh?
I have mapped alt-k and alt-j for browsing history, but I would like to switch vicmd automatically whenever I call up a history entry, because most of the time I need to move the cursor to a certain ...
2
votes
1answer
188 views
Is there a way of color-highlighting paired brackets in shell (bash)?
Does anyone know if there is a way reproducing the same behaviour many text editors provide for colour-highlighting the syntax operators such as brackets or curly brackets. It would be very useful for ...
2
votes
0answers
126 views
Tcsh: Searching history using Ctrl-P and Ctrl-N
What are the equivalent functions in tcsh for the following zsh functions?
up-line-or-history
history-beginning-search-backward
down-line-or-history
history-beginning-search-forward
I have the ...
7
votes
3answers
288 views
How to repeat currently typed in parameter on bash console?
I was just typing something along the lines of:
mv foo/bar/poit/zoid/narf.txt
and suddenly realized, damn, I have to type large parts of that parameter again
mv foo/bar/poit/zoid/narf.txt ...
4
votes
4answers
481 views
Replace whole line in a file from command-line
I have a text file which has some contents similar to this:
# General information about the project.
project = u'Py6S'
copyright = u'2012, Robin Wilson'
# The version info for the project you're ...
11
votes
2answers
1k views
zsh wants to correct vim to .vim
I'm using zsh on Gentoo x64, and when I type sudo vim /path/to/file from my home folder, zsh asks:
zsh: correct 'vim' to '.vim' [nyae]?
I want to run vim not my .vim folder. How do I fix this?
...
1
vote
2answers
163 views
Is there a convenient way to wrap a bash command list into rlwrap?
Thanks to a question on superuser.com, I found out about this utterly convenient rlwrap tool.
It satisfies my needs (i.e. add command history to another cmdline tool), but I was wondering how I can ...
2
votes
1answer
97 views
History-search in zsh working only for commands?
Say I have the following entries in my command history:
less documents/doc1.txt
less documents/doc2.txt
less files/file1.txt
less files/file2.txt
ls
pwd
and that I have the following keyboard ...
19
votes
3answers
2k views
Change cursor shape (or color) to indicate vi mode in bash
To clarify: I am not asking how to change the cursor when using vim within a terminal. I want the cursor to change when switching between input and command mode within Bash's vi-mode:
set -o vi ...
4
votes
1answer
211 views
Adding more Emacs-like bindings to ZSH's line editor (ZLE)
I have a couple of questions regarding the emacs-like keyboard bindings in Zsh. As background to all the questions: I have Emacs-like keybinding activated with bindkey -e (activated by default)
...
5
votes
2answers
2k views
ZSH: search history on up and down keys?
Currently, I have the following in my .zshrc:
bindkey '^[[A' up-line-or-search
bindkey '^[[B' down-line-or-search
However, this only seems to match the content of my current input before a space ...
4
votes
2answers
1k views
Stop ZSH from trying to correct command
$ knife cookbook download recipe
zsh: correct 'cookbook' to 'cookbooks' [nyae]?
How can I get zsh to stop trying to correct cookbook to cookbooks??
cookbooks is a directory where I run the command ...
4
votes
2answers
1k views
zsh kill Ctrl + Backspace, Ctrl + Delete
How to configure zsh such that Ctrl+Backspace kills the word before point? How to achieve that Ctrl+Delete kills the word after point?
I use urxvt as terminal emulator.
9
votes
2answers
506 views
Copy and set-mark in Bash as in Emacs?
I would like to be able to copy and paste text in the command line in Bash using the same keyboard bindings that Emacs uses by default (i.e. using C-space for set-mark, M-w to copy text, C-y, M-y to ...
3
votes
1answer
404 views
zle - I cannot find why Ctrl+R does not work for non-root
The Ctrl+R works for root (well toor) however I cannot find why it does not work for user.
User .zshrc:
setopt AUTO_CD
setopt CORRECT_ALL
setopt EXTENDED_GLOB
# History
SAVEHIST=10000
HISTSIZE=10000
...
17
votes
1answer
874 views
Using zsh's line editor to wrap around subprocesses
Is it possible to use zsh's built-in line editor (zle) to feed input to a subprocess? That is, I would like to run zlewrap mycommand where zlewrap is a zsh function and mycommand is any program that ...