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

Backquotes, aliases get 'em, BTMs don't?

Discussion in 'Support' started by vefatica, Jan 24, 2013.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    Is that right ... backquotes are passed to aliases but not to BTMs? I was a little surprised. Is that WAD?
    Code:
    v:\> alias eeval
    echo %@eval[%1]
     
    v:\> eeval `1+2`
    TCC: No expression "`1+2`"
     
    v:\> type eeval.btm
    echo %@eval[%1]
     
    v:\> eeval.btm `1+2`
    3
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,726
    Likes Received:
    80
    WAD. Back quotes are removed after alias & variable expansion is performed, and just before the command is passed to the parser routine that sends it to the appropriate place for execution (external app, batch file, or internal command).

    If back quotes were removed before alias expansion, they'd be completely useless.
     

Share This Page