Terminal question

Discussion in 'macOS' started by Nick T., Jan 5, 2008.

  1. Nick T. macrumors regular

    Joined:
    Oct 4, 2006
    Location:
    SoCal
    #1
    Hi y’all - - - I’m pretty new to OS X and Unix, so I’m not very good at knowing where to lookup information yet.

    In terminal a couple of days ago I had used cat to display the contents of a file which I have been editing frequently with vi. After being distracted for a few minutes I glanced at the screen, assumed that I was in vi, and hit ESC twice as a prelude to exiting (to ensure that I haven’t overlooked the - - INSERT - - at the bottom of my screen). When I didn’t get a bell, I finally really looked at the screen and saw that I’d been at the command prompt with the ESC ESC and was now being asked: Display all 1241 possibilities? (y or n)

    I didn’t want to respond with a “y” because I didn’t want to start something that would take forever to complete.
    What does ESC ESC mean, and more importantly, how should I have looked this up - - system docs? Online? O’Reilly books?

    Thanks,
    -Nick T.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    It sounds like you were back at the command prompt and hit ESC-ESC which is the command to autocomplete the current partially typed command. As you had not typed anything the system offered to list all possible commands.
     
  3. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #3
    It appears to simply ask what command you intended to enter (I just did it and was presented with a list of commands, though not the 1243 it said were available, just the first page). Didn't know that was available, but not sure how useful it is.

    jW
     
  4. ScoobyMcDoo macrumors 65816

    Joined:
    Nov 26, 2007
    Location:
    Austin, TX
    #4
    To answer your question about where to get information:
    Assuming your running bash as your shell, type "man bash" at the command prompt to get bash docs.
     
  5. Nick T. thread starter macrumors regular

    Joined:
    Oct 4, 2006
    Location:
    SoCal
    #5
    Thanks!

    Great answer - thanks!

    Experimentation shows that when entered at the command line ESC ESC seems to act like a single TAB; command expansion or directory expansion is performed.

    ScoobyMcDoo - - Thanks for pointing me to the bash docs - - but since I haven’t yet discovered how to do a search in man, I had no luck in finding out anything about ESC.

    My early learning about the command line interface has been fun so far, and your assistance certainly makes it easier.
     
  6. Nick T. thread starter macrumors regular

    Joined:
    Oct 4, 2006
    Location:
    SoCal
    #6
    some good ......

    at least this made me learn about the "/" and "?"
     

Share This Page