Directory history file and global directory history

Discussion in 'Support' started by David Marcus, Sep 11, 2011.

  1. vefatica

    Message Count:
    3,910
    I have always used SHRALIAS and never considered a dirhistory file. Having considered it a little, I can see only two uses for it.

    (1) ... with global dirhistory, as a replacement for SHRALIAS ... in which case, it should work as David proposes ... read by a TCC started when no others are running and written at exit by a TCC that will leave no others running ... anything else and you don't really have a global (shared) dirhistory

    (2) ... with local dirhistory ... to load a basic set of frequented directories; if that were my intent, I'd want it loaded by every instance of TCC.

    Do others see it differently?
  2. samintz Scott Mintz

    Message Count:
    749
    I'm probably the odd-man out in this group.
    I never use global lists or SHRALIAS. I almost exclusively
    work from a single instance of TCC running in TCMD. On the rare occasions
    when I start additional tabs, I usually don't care about the histories
    of other tabs. That being said, I do have specialty code in my TCSTART
    file to restore my work environment if I choose to do that.

    My work environment consists of:
    the environment (i.e. SET)
    aliases
    dirhistory
    history
    and CWD's of each drive (the output
    of CDD /A).

    Code:
    set s=Y
    inkey /c /k"YN[Enter]" /w10
    /x Restore Previous Environment? (Yn) %%s
    echo.
    iff "%s" eq "Y"
    .OR. "%s" eq "@28" then
      for %%s in (@c:\JPSOFT\drives.dat)
    do cdd %%s
      set /r c:\JPSOFT\env.dat
      dirhistory /r c:\JPSOFT\dirhist.dat
      history /r c:\jpsoft\history.dat
    endiff
    
    -Scott

    vefatica <> wrote on 10/19/2011
    07:58:14 PM:



    in



  3. David Marcus

    Message Count:
    540
    In which case, you probably wouldn't want TCC to overwrite your file when it exits, would you?
  4. vefatica

    Message Count:
    3,910
    On Wed, 19 Oct 2011 21:12:23 -0400, David Marcus <> wrote:

    |---Quote (Originally by vefatica)---
    |(2) ... with local dirhistory ... to load a basic set of frequented directories; if that were my intent, I'd want it loaded by every instance of TCC.
    |---End Quote---
    |In which case, you probably wouldn't want TCC to overwrite your file when it exits, would you?

    Very correct! I didn't think of that.

Share This Page