zsh-zle Questions
4
Solved
I have been dealing with this problem for almost a month now, and I feel frustrated, Any help would be greatly appreciated.
I am trying to write a widget for my takenote command. The purpose of th...
Olia asked 2/1, 2018 at 4:30
7
Solved
How to use shift to select part of the commandline (like in many text editors) ?
10
Solved
Can I configure my prompt to show a new line after each command?
To give you an example. In the following screenshot I did run cat .zshrc. I want to have a new line between the last output line of...
1
I want to create a widget bound to a hotkey that prints the current command description in rich text below the prompt, then erases it after a keypress. Like so (simplified):
widget() {
zle -R &quo...
7
Solved
Sometimes I use multiline commands in zsh:
❯ echo \
> a \
> multiline \
> command
When editing the command after pulling it from a history search, I can change the content of individual...
2
Solved
I usually find interesting zsh keybinding settings (through bindkey command) around the web. My question is how do I interpret what these escaped sequences mapped to? For instance, here is a snippe...
Bellarmine asked 15/3, 2011 at 15:40
6
Solved
Where can I find a list of zsh commands that I can use with bindkey, with descriptions?
Each time that I look for name of some standard action (e.g., end-of-line), I need to google and guess that ...
1
Solved
I have the following widget defined
function cdd()
{
cd /
}
zle -N cdd{,}
bindkey "^R" cdd
After pressing the key combination the cwd is already changed, but the terminal prompt is not updated....
1
I am new to ZSH and have been using oh-my-zsh to rum ZSH on OSX 10.9. I've been trying to take an advantage of a history plugin but I get this, "widgets can only be called when ZLE is active." when...
4
All shells understand these commands:
$ cd .
$ cd ..
And zsh will also understand:
$ cd ...
$ cd ....
Provided you say:
$ alias -g ...='../..'
$ alias -g ....='../../..'
Now, how can I mak...
Cinerarium asked 4/5, 2014 at 13:33
4
Solved
In my .zshrc, I use the following snippet to integrate the shell's clipboard and my primary X11 clipboard. Thanks to this integration, I can cut-and-paste text to and from emacs, firefox, and the t...
6
Solved
I have a zsh prompt I rather like: it evaluates the current time in precmd and displays that on the right side of the prompt:
[Floatie:~] ^_^
cbowns% [9:28:31 on 2012-10-29]
However, this isn't...
1
Solved
Its not essential but it bugs me a bit,
here is the fragment from my .zshrc
a function/widget called add_sudo, that will go at the beginning of line, writes sudo there and then should go at the en...
1
Solved
I have this snippet:
insert_sudo () { zle beginning-of-line; zle -U "sudo "; zle end-of-line; }
zle -N insert-sudo insert_sudo
bindkey "\es" insert-sudo
But \es only appends "sudo" to the end of...
3
Solved
I know that I can exec a date command in my zsh prompt.
However, it shows the old time; to see the current time, I have to hit <return> and get a new prompt with the current time.
Is there a...
2
Is there a way to modify the command that is about to execute?
I would like to redirect the output to a file, as well as print it on the terminal.
I found that ls > file.txt | cat does the job,...
1
Solved
Zsh has a nice feature of expanding globs. For example, hitting Tab turns ls **/*.js into
ls app/assets/javascripts/application.js vendor/assets/javascripts/Markdown.Converter.js
Is there a way ...
1
© 2022 - 2025 — McMap. All rights reserved.