[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

1715.0. "Current Directory as a Prompt" by MTWAIN::MACDONALD (WA1OMM 7.093/145.05/223.58 AX.25) Thu Sep 22 1988 20:03

    Well, everyone has been asking, "Gee Paul, how do you get your CLI
    prompt to display your current device and directory all the time?"
    Well, guess I will have to let my secret out of the hat. If you
    have Dillon's Shell V2.10 and a .SH setup file for it, add the
    following lines to that setup file in the order shown:
        
    set _prompt echo -n $_cwd ^H">" ^Y
    alias dx "pwd >nil:"
    alias cd "%var \\cd $var;dx;set _prompt echo -n $_cwd ^H">" ^Y >nil:"
        

    Now, whenevr you do a CD, the directory that you are in will appear
    as your prompt "character."
    
    Paul
    
T.RTitleUserPersonal
Name
DateLines
1715.1You can do it with ARP tooPUERTO::ALVAREZMiguel,from sunny Puerto RicoThu Sep 22 1988 20:136
    	You can also do it if you have ARP. There is a command (I'm
    at work, so I don't have it on hand), which will make your CLI prompt
    be your current device and directory/sub-directory. I'll look for
    it and add it here tomorrow.
    
    Miguel A. Alvarez
1715.2shell 2.10 ?? upload??PCCAD7::BAEDERD. Scott DTN 237-2961 SHR1-3/E19Thu Sep 22 1988 22:146
    dillon shell 2.10...can we upload it...last version I saw was bakc
    at 2.07 or 2.08 of the dillon/drew shell...if so, I'll add to the
    archives here....
    
    scott.
    
1715.3RDCV01::RANDREWSOut of his mind, but not dangerousThu Sep 22 1988 22:506
    I've got it at home, I'll try to do it later tonight when I get
    there (probably early morning)
    
    I looked it it.  It seems VERY different from 2.07 that I have.
    Not as friendly at all.  I didn't like it.
    
1715.4ARP PROMPTLEDS::ACCIARDIFri Sep 23 1988 04:186
    
    Under ARP, just type 'PROMPT' or insert PROMPT into your startup
    file.  Any CLI prompt will now be the current directory for that
    window.
    
    Ed.
1715.5switches required?GILBRT::BEAUREGARDRoger Beauregard SHR1-3Fri Sep 23 1988 12:1912
    
    Actually, if you're using ARP, there are switchs you can add to
    the end of the prompt command. I'm pretty sure they are %n and %p.
    %n will give you the cli number (e.g. 3>) and %p will give you the
    current directory (e.g. df0:c). I could be wrong about the %p switch
    since I installed the switch in  my startup sequence months ago
    and haven't looked at it since. If %p isn't correct, just read the
    ARP documentation, it's in there. I am sure about the %n.
    
    
    Roger
     
1715.6Prompt "%N %p" really...PUERTO::ALVAREZMiguel,from sunny Puerto RicoFri Sep 23 1988 12:2011
>        Under ARP, just type 'PROMPT' or insert PROMPT into your startup
>    file.  Any CLI prompt will now be the current directory for that
>    window.
>    
>    Ed.

     	You need a little more than that. If you type Prompt "string",
    your CLI prompt will always be "string". Prompt "%N %p" will make
    your CLI be your task number (%N) and your current directory (%p).
    
    Miguel A. Alvarez
1715.7MTWAIN::MACDONALDWA1OMM 7.093/145.05/223.58 AX.25Fri Sep 23 1988 13:4711
    The Dillon Shell for V2.10 IS different than the previous release
    that most of you are using, mainly because it hasn't been Drewized
    yet. Drew's changes typically improve the friendliness and
    functionality. There appear to be several bugs in V2.10. For example,
    if you type  DIR V* to display all files starting with V, the entire
    directory is displayed. If you type DEL * to delete all the files
    in the directory, it only deletes a few. Those with name longer
    than n characters are missed. However, typing DEL * a second time
    removes the remaining files. Very strange indeed.
    
    Paul
1715.8Where is ARP?RAVEN1::EVERHARTFri Sep 23 1988 16:023
    	OK, guys.  Where can I get ARP?
     - Chris
    
1715.9Pointer ---->PUERTO::ALVAREZMiguel,from sunny Puerto RicoFri Sep 23 1988 20:084
    Re. 8
    		See notes 1534 and 1239.
    
    Miguel A. Alvarez