bindkey -M emacs |grep edit-command
"^X^E" edit-command-line
ctrl x ctrl e pour editer la commande actuelle via vim
history command is the same than fc -l
fc is used to manage history
MAIS omyzsh declare un alias history :
https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/history.zsh
ce qui equivaut à history = fc -l 1
Most other shells have aliases of this kind (command aliases). However, zsh also has global aliases, which are substituted anywhere on a line. Global aliases can be used to abbreviate frequently-typed usernames, hostnames, etc.
% alias -g me=pfalstad gun=egsirer mjm=maruchck
% who | grep me
pfalstad ttyp0 May 24 03:39 (mickey.Princeton)
pfalstad ttyp5 May 24 03:42 (mickey.Princeton)
% fm gun
Login name: egsirer In real life: Emin Gun Sirer
Directory: /u/egsirer Shell: /bin/sh
Last login Thu May 23 19:05 on ttyq3 from bow.Princeton.ED
New mail received Fri May 24 02:30:28 1991;
unread since Fri May 24 02:30:27 1991
% alias -g phx=phoenix.princeton.edu warc=wuarchive.wustl.edu
% ftp warc
Connected to wuarchive.wustl.edu.
Here are some more interesting uses.
% alias -g M='| more' GF='| fgrep -f ~/.friends'
% who M # pipes the output of who through more
% who GF # see if your friends are on
% w GF # see what your friends are doing
alias -g gp='|grep '
zsh ça a l'air bien quand même. Le coup des alias inline ça rox ( gp=|grep -i )