3 ms·
Globs in an interactive shell should get expanded and then force you to press enter to confirm the command with expanded globs. Are there any shells that implem
by pabs3 5y ago
Globs in an interactive shell should get expanded and then force you to press enter to confirm the command with expanded globs. Are there any shells that implement this?
- louiskottmann 5y agoThat would become unreadable in many cases, like du -sh *
- deleted 5y ago[deleted]
- jraph 5y agoIn zsh, you can press tab after something that will get expanded, and it expands in place. I actually use it quite often to check whether the expansion is right. However, this does not cover the case where an unexpected globbing happens like in this find situation.
- massysett 5y agoI looked through zshoptions(1) and didn’t see anything like this. However you can turn off globbing entirely with “unsetopt glob”. There are however other expansions that occur outside of globbing, such as parameter substitution. It might be possible to implement this using zsh’s line editor, but it would take some digging through the man pages to figure this out (or finding a zsh expert). Try zshzle(1). Yeah this is probably a much more complicated answer than you were looking for.