1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Leading question mark in command

Discussion in 'Support' started by dcantor, Feb 28, 2010.

  1. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    Win XP Pro SP3, TCC 11.00.40

    I discovered quite accidentally that a command with a leading question mark (but not a single isolated question mark) asks the user whether to execute the command.

    E.g.,
    > ?foo
    foo (Y/N)? Y
    TCC: Unknown command "foo"

    > ?echo food
    echo food (Y/N)? Y
    food

    > ?echo drink
    echo drink (Y/N)? N

    (nothing)

    This works if the command is in a .bat or .btm file, too.

    I have no alias named "?".

    I couldn't find anything in the help file about it (but that just may be because I didn't know how to look it up).

    Rex, is this a feature?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    HELP QMARK

    (You can use the ? command to prompt whether or not to execute the ? command: ?? will display a list of internal commands or not, at the user's option. Oddly enough, ? appears to be the only internal command which does not recognize the /? option....)
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    Yes, a very, very, very old one -- for compatibility with DR-DOS.

    It's documented under the "?" command.

    Rex Conn
    JP Software
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    Neither does REM. Since neither have arguments, there's not much point in
    displaying help for them.

    Rex Conn
    JP Software
     
  5. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    When I enter "?" on the command line and then press F1, I get an error
    message "This program cannot display the webpage."

    Perhaps even worse, when I select the "?" command, the help for DETACH
    comes up instead.

    TCC 11.00.40 x64 Windows 7 [Version 6.1.7600]
    TCC Build 40 Windows 7 Build 7600

    -- Jay
     
  6. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    Correction. I wrote:

    > Perhaps even worse, when I select the "?" command,
    > the help for DETACH comes up instead.

    It turned out I was not selecting the "? (command)" help entry but the
    plain "?" entry (the two are not next to each other). Help for the
    latter, indeed, does not work.

    -- Jay
     
  7. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    This is a Windows Help issue; nothing I can do about it.


    Not reproducible here.

    Rex Conn
    JP Software
     
  8. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0

    I can.

    From TCC within TCMD, I type HELP then in the Index tab, I double click the
    ? that's in between .XOR. and _? and DETACH comes up.


    TCC 11.00.40 Windows XP [Version 5.1.2600]
    TCC Build 40 Windows XP Build 2600 Service Pack 3


    --
    Jim Cook
    2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Monday.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    That's not the ? command, that's the ? character -- which in Windows Help
    will match any topic that has a single character in its text. (Not very
    useful, but direct your complaints to Microsoft!)

    Rex Conn
    JP Software
     
  10. Kachupp

    Joined:
    Aug 9, 2009
    Messages:
    133
    Likes Received:
    0
    V8 4nt

    In a batchfile if you were to do this

    ? "Load firefox" firefox.exe

    it would prompt (Y/N) to load

    out side of a batchfile it behaves as you'd expect listing internal commands
    and plugins

    Hope this clears this annoying little thread up :)

    -----Original Message-----
    Subject: RE: [Support-t-1759] Leading question mark in command


    ---Quote---

    ---End Quote---
    That's not the ? command, that's the ? character -- which in Windows Help
    will match any topic that has a single character in its text. (Not very
    useful, but direct your complaints to Microsoft!)

    Rex Conn
    JP Software
     

Share This Page