Skip to content

automatically escape arguments like when we hit the tab key in command line shells

License

Notifications You must be signed in to change notification settings

banyan/zsh-auto-escape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zsh-auto-escape

zsh-auto-escape is a zle widget ("zsh plugin") that will automatically escapes around the argument of certain commands just like when we hit the tab key in command line shells. The motivation is that the remix framework recommends using file names with dollar signs, which was inconvenient, so I created it.

Demo

How it works

If the argument of the configured command contains a special charcter, it's converted to the argument with being escaped just before execution.

❯ code aa bb$bb cc # => code aa bb\$bb cc

If the argument is already escaped, it just leaves as it is.

❯ code aa bb\$bb cc # => do nothing

Installation

Manually

Download zsh-auto-escape.zsh and source it from your ~/.zshrc file. Then make sure that you add some prefixes:

source ~/somewhere/zsh-auto-escape.zsh
ZSH_AUTO_ESCAPE_PREFIXES=('vim' 'code')
zinit light banyan/zsh-auto-escape

License

MIT

About

automatically escape arguments like when we hit the tab key in command line shells

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages