Skip to main content

Questions tagged [zle]

9 votes
1 answer
221 views

Why does zsh delete a trailing comma when I type a closing brace? For example, trying to compare two files foo.txt.bak and foo.txt: diff foo.txt{.bak,} When I type that closing brace, the comma is ...
mgiuffrida's user avatar
5 votes
1 answer
553 views

I recently upgraded KDE Plasma to v6, got ZSH instead of BASH in it and because I like some of its smart completion features and such, I decided to try to learn working with it. But I have a hard time ...
edison23's user avatar
  • 165
0 votes
2 answers
78 views

I have a zle like: function _ctrl-shift-left() { ((REGION_ACTIVE)) || zle set-mark-command # Selection zle backward-word } zle -N _ctrl-shift-left bindkey '^[[1;6D' _ctrl-shift-left # Ctrl+...
Ahmad Ismail's user avatar
  • 3,164
3 votes
2 answers
184 views

I would like to run some code when zle becomes active. The only way I know how to do that is zle-line-init() { echo hi } zle -N zle-line-init But AFAIK this will replace any potential existing ...
user avatar
1 vote
1 answer
122 views

I need a zle function that will print the character before and after the cursor. print-char-before-after() { # Get the position of the cursor local cursor_pos=$CURSOR # Get the text in ...
Ahmad Ismail's user avatar
  • 3,164
1 vote
0 answers
195 views

I am trying to create a keybinding for CMD (on Mac)/CTRL (on Linux) + Backspace to delete everything before the cursor. I cannot for the life of me figure out what key sequence I should use. I am ...
Sarp User's user avatar
0 votes
1 answer
610 views

I am using tmux with the zsh shell. I try to setup fzf, and I do it like this (inside my zshrc): eval "$(fzf --zsh)" This works, as long as I am not in tmux. I can use Ctrl-R and get the ...
Nathan's user avatar
  • 173
1 vote
1 answer
381 views

In the documentation for the Zsh Line Editor, there is a section that says: For either in-string or out-string, the following escape sequences are recognised: \a bell character \b ...
xdhmoore's user avatar
  • 145
0 votes
0 answers
254 views

I would like to have a near-flawless "single file selector" with zsh. So far I haven't seen one in questions as they tend to focus on zle settings for one's command line. Let's say we are ...
codepoet's user avatar
  • 636
0 votes
1 answer
100 views

Since I use both bash and zsh, I'd like to learn the zle's emacs keymap (since this is the default in bash). My problem is that macOS's option key does not work with the meta shortcuts (like M-. for ...
buduboti's user avatar
2 votes
0 answers
82 views

Is there a way to change the prompt of zle widgets such as history-incremental-backward-search? For instance I wonder if we can colorize "bck-i-search:" or change the string, or colorize the ...
jds's user avatar
  • 21
1 vote
1 answer
1k views

For example, if I hit the right combination of keys to enter viins and walk away from the terminal and forget, how can I tell when I get back? How can I tell what the default mode is? The guide has ...
ian's user avatar
  • 169
3 votes
1 answer
351 views

I am working on a zsh widget to fuzzy search history. skim-history() { origquery=${BUFFER} output=$(history -1 1 | sd '^[ ]*[0-9]*[ ]*' '' | sk --tac --no-sort --exact) if [ $? -eq 0 ]; then ...
Ahmad Ismail's user avatar
  • 3,164
0 votes
1 answer
182 views

Hope you're doing well. I have the following in my .zshrc: # 1. invoke zoxide to pick dir # 2. open target dir in ranger # 3. when exiting ranger, cd into last dir zoxide_to_ranger () { eval '...
kohane15's user avatar
  • 264
6 votes
2 answers
2k views

In bash, I used this: % cat .inputrc "\e[A": history-search-backward "\e[B": history-search-forward I'd like the same behavior in .zsh, so I've tried these bindkeys: "^[[A&...
mayostard's user avatar

15 30 50 per page