Format nicely some example code

master
Jacopo De Simoi 9 months ago
parent b30b6c2755
commit fb5c82165a
  1. 38
      zshrc.org

@ -73,25 +73,27 @@ defined in the previous section.
tell the shell where to look for them. Whenever you reference a tell the shell where to look for them. Whenever you reference a
function, the shell will automatically load it into memory. function, the shell will automatically load it into memory.
% mkdir /tmp/funs #+begin_src sh :tangle no
% cat >/tmp/funs/yp % mkdir /tmp/funs
ypmatch $1 passwd.byname % cat >/tmp/funs/yp
^D
% cat >/tmp/funs/cx
chmod +x $*
^D
% FPATH=/tmp/funs
% autoload cx yp
% functions cx yp
undefined cx ()
undefined yp ()
% chmod 755 /tmp/funs/{cx,yp}
% yp egsirer
egsirer:*:3214:35:Emin Gun Sirer:/u/egsirer:/bin/sh
% functions yp
yp () {
ypmatch $1 passwd.byname ypmatch $1 passwd.byname
} ^D
% cat >/tmp/funs/cx
chmod +x $*
^D
% FPATH=/tmp/funs
% autoload cx yp
% functions cx yp
undefined cx ()
undefined yp ()
% chmod 755 /tmp/funs/{cx,yp}
% yp egsirer
egsirer:*:3214:35:Emin Gun Sirer:/u/egsirer:/bin/sh
% functions yp
yp () {
ypmatch $1 passwd.byname
}
#+end_src
*** Include :daily: *** Include :daily:

Loading…
Cancel
Save