Path: utzoo!utgpu!water!watmath!uunet!labrea!rutgers!noao!asuvax!nud!mcdchg!ethos!bacchus!darren From: darren@bacchus.UUCP (Darren Friedlein) Newsgroups: unix-pc.general Subject: Another cute FKey thing in Ksh... Message-ID: <680@bacchus.UUCP> Date: 16 Sep 88 02:03:08 GMT Organization: The Humanities Forum - Research Triangle Park; Durham, NC Lines: 35 Since people are posting cute ways to use function keys from ksh, I just HAD to post this. It's really a joke, it's so slow, but here's an excert from my .profile that lets me redefine function keys as usefull things. It's pretty short. Comments are welcome!-) ----- set -oa emacs alias _A='mA alias _N='mN alias _O='mO alias _P='mP function mO { stty raw inchar=`dd bs=1 count=1 2>/dev/null` stty cooked cmddd='' case "$inchar" in "c") cmddd='ls';; "d") cmddd='ls -la';; "e") cmddd='ls -la | more';; "f") cmddd='mailx';; esac echo "[1A$PS1[0K$cmddd" { $cmddd; } } ----- -darren ____ / \ | Rt 4, Box 416, Durham, NC 27703 _____|_____ Darren G. Friedlein data (bacchus) : 919/596-7746 / | \ voice : 919/596-9492 ( | ) \____/ __/ {mcnc|icus|ditka|ethos|gladys|bakerst}!bacchus!darren