Format nicely some example code

master
Jacopo De Simoi 9 months ago
parent b30b6c2755
commit fb5c82165a
  1. 40
      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 ypmatch $1 passwd.byname
% cat >/tmp/funs/cx ^D
chmod +x $* % cat >/tmp/funs/cx
^D chmod +x $*
% FPATH=/tmp/funs ^D
% autoload cx yp % FPATH=/tmp/funs
% functions cx yp % autoload cx yp
undefined cx () % functions cx yp
undefined yp () undefined cx ()
% chmod 755 /tmp/funs/{cx,yp} undefined yp ()
% yp egsirer % chmod 755 /tmp/funs/{cx,yp}
egsirer:*:3214:35:Emin Gun Sirer:/u/egsirer:/bin/sh % yp egsirer
% functions yp egsirer:*:3214:35:Emin Gun Sirer:/u/egsirer:/bin/sh
yp () { % functions yp
ypmatch $1 passwd.byname yp () {
} ypmatch $1 passwd.byname
}
#+end_src
*** Include :daily: *** Include :daily:

Loading…
Cancel
Save