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 to collapse it back to original glob version? Or should I just disable glob expanding?
The reason I want it, is that when I am in the middle of debugging a glob and I hit Tab
just to double check something, there is no way to get back and complete the pattern. I have to start from scratch.
Use the undo
zle
command. For example, bind it to Ctrl_:
bindkey '^_' undo
From zshzle(1)
:
undo (^_ ^Xu ^X^U) (unbound) (unbound)
Incrementally undo the last text modification.
redo Incrementally redo undone text modifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With