o que o sinalizador -s faz
alias -s ...
cria um Sufixo Alias , que permite atribuir comandos a sufixos de nome de arquivo.
Sufixo de apelidos
Since zsh 4.2.x its possible to make a programme alias for a given filename extension. That means, you can assign commands to filename suffixes.
alias -s txt='less -rE'
Now every time you enter a $filename with extension .txt
less -rE $filename
is invoked.If you use
'*.txt'
then all files with that extension will be invoked with the commandless
with options-r -E
.
Fonte link
Exemplos
Suffix aliases are supported in zsh since version 4.2.0. Some examples:
alias -s tex=vim alias -s html=w3m alias -s org=w3m
Now pressing return-key after entering foobar.tex starts vim with foobar.tex.
Calling a html-file runs browser w3m.
www.zsh.org and pressing enter starts w3m with argument www.zsh.org.
Fonte ZSH-LOVERS (1)