The line-editor tag has no wiki summary.
2
votes
3answers
70 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
71 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
171 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
114 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 ...
6
votes
3answers
230 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 ...
3
votes
4answers
396 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
142 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
91 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 ...
18
votes
3answers
1k 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
199 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
1answer
1k 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 ...
3
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
978 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.
8
votes
2answers
468 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
391 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
856 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 ...