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

Documentation Unhelpful help

Discussion in 'Support' started by djspits, Feb 25, 2013.

  1. djspits

    Joined:
    Apr 13, 2010
    Messages:
    187
    Likes Received:
    2
    I do not understand the folowing help-tekst:

    In the topic
    _CMDLINE
    the phrase
    " ... it returns the contents of the command line with the %_cmdline name removed."

    With what removed?


    An example would help.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    The %_cmdline variable is expanded to the contents of the current command line (not including "%_cmdline"), and %_cmdline is removed. So:

    Code:
    echo one two three %_cmdline
    returns

    Code:
    one two three echo one two three
     
  3. djspits

    Joined:
    Apr 13, 2010
    Messages:
    187
    Likes Received:
    2
    It would be helpful (to me at least) if I was shown an example that actualy communicated something about its intended use.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    It's intended to be used for key aliases, when you want the alias behavior to be dependent on the current contents of the command line. (For example, if you were writing something like a tab filename completion routine.)

    If you're not writing key aliases, it's unlikely that %_cmdline is going to be of any use to you.
     

Share This Page