[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Working in several subdirs



... was "TTE: Tim's Terrific Enhancements": "Would others find it
useful to have a stack/list of previously accessed subdirectories
so we could easily move among several different subdirectories?
[...] I often find myself labouriously moving among three or four
different directories. [...]" --Myron

Myron: When I'm working on files in various subdirs I sort of
informally assign each a window. Path of each needs to be typed
on CMline only once because I use a file-/session-closing xpl pgm
that--depending on a keystroke it's received--stores a file with
eof or saves it without or aborts, then
*lists the subdir the file is in*. (Could easily cd to it, but I
don't want it to.) If I need more than one file in one subdir
open at the same time, I open another window. It's a low-tech
goddessend ;) that works for me. This fragment closes a file,
then lists its subdir. --A

===========================================================

Analysis of a keystroke has narrowed {is86} down to 0 to 2:
   2   save with no eof
   1   store with eof
   0   abort

xyDos 4 ====================================================

if not abort, saves file and diverts zap-eof:

CI {if{pv86}>0}GT BD {PRwriting to disk ...}BX
(sa){ei}{if{pv86}>1}{GLxeof}

no va$ I know of reports just the path of an open file so, to
display the subdir, pgm manipulates va$fp and va$fi, using is13
for file's path and name and is86 for length of file name:

{ei}{sx86,{va$fi}}{sx13,{va$fp}}{sx86,({va|86})}{lb

subtracts file name from is13 on CMline to list file's subdir
with ed ready:

}BX (ab)BC dir {pv13}{LBfp}{if({pv86})>0}BD {sx86,{pv86}-1}{GLfp}
{ei}XC BC ed GT LD LD {GLx}

{LBxeof} [code omitted (do'es an external utility)] {LBx}BX (es
0){ex}

xyW 3 ======================================================

{if{pv86}>0}BC sa{PRwriting to disk ...}DX XC DO {lb
}{ei}{if{pv86}>1}{GLxeof}

{ei}{sx13,{va$fp}}{sx86,{va$fi}}{sx86,(@siz({is86}))}{lb

}BC abXC BC dir {pv13}{LBfp}{if({pv86})>0}BD
{sx86,{pv86}-1}{GLfp}
{ei}XC BC es 0XC BC ed GT LD LD {ex}

{LBxeof} [code omitted (do'es an external utility)]

========================== annie fisher  nyc