Auto-completion is available for different applications but through different mechanisms. Snippy is a text-expander tool that delivers system-wide auto-completion using unified text snippets. It works uniformly for the browser of editor or the console.
- Easy to install (automatically checks for xdotool xsel and dmenu)
- Usable in console AND windows like browsers
- Interactive snippets using bashdown: parse bash inside templates
- Resolves symlinks (easy to cross-reference editor- email- which already exist)
- Execute plain bash to paste into browser
Run the following commands to install Snippy:
$ curl -L "http://tinyurl.com/o9d6ch5" > snippy.sh $ chmod 755 snippy.sh $ sudo mv snippy.sh /usr/bin/
Snippy uses bash to expand and execute. You need to create a keyboard shortcut to run Snippy. An example expander key is
Create the ~/.snippy directory with snippets, empty files or symlinks to snippets. The files can be empty (‘firstname.lastname@example.org’) just for auto-completion or they could automate certain laborious reports or stats, since it parses bash from the snippets.
Let’s check an example file:
$ cat ~/.snippy/tomorrow $(date --date='tomorrow' +'%Y-%m-%d' | tr '[:upper:]' '[:lower:]' )
This would turn ‘see you tomorrow’ into ‘see you xxxx-xx-xx’ (tomorrow’s date). Another one:
$ cat ~/.snippy/report-manager curl -v -X GET "http://company.foo.com/api/v1.0/revenue?fmt=pretty-json" | grep "total_lasagna" | sed 's/^[a-zA-Z0-9 ]/g'
Webpage: Snippy (website down)