Article 4YE1S ZSH set behaviour when command reading

ZSH set behaviour when command reading

by
hashille
from LinuxQuestions.org on (#4YE1S)
Hello everyone,
I hope i'm in the good place to start with.
Here is my question : I've been looking for a way to set a defined behaviour when zsh is reading from the command-line, i've come across Zshzle but can't find anything related to what I would like to do :
I would like to start all of my commands with a special character and if it's not there, call my "lock" alias.
Let's say I have the following command line :
"vim ~/.bashrc"
then it would call my "lock" alias and lock my computer, as the "good" input would have been "h vim ~/.bashrc".
Any suggestions ?
Thankslatest?d=yIl2AUoC8zA latest?i=zlv0qUVPLhE:gNCbCkhws0E:F7zBnMy latest?i=zlv0qUVPLhE:gNCbCkhws0E:V_sGLiP latest?d=qj6IDK7rITs latest?i=zlv0qUVPLhE:gNCbCkhws0E:gIN9vFwzlv0qUVPLhE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments