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

Temporarily Disabling Aliases

Discussion in 'Suggestions' started by Joe Caverly, Feb 18, 2015.

  1. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    680
    Likes Received:
    8
    Before I visit feedback to post for an enhancement, I would like to see if others feel this would be a worthwhile enhancement.

    If I have an alias called pwd, but I also have a command pwd, of course I can
    Code:
    *pwd
    to run the command instead of the alias.

    Also, if I do
    Code:
    which /a pwd
    it shows that the alias is used first instead of the command.

    No problem so far.

    I would like to have the which command be able to display the command that would be executed if I were to disable the alias, for example
    Code:
    which *pid
    As of now, if I use which pwd or which *pwd it always returns that it is an alias.

    Joe
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    That sounds like a sensible behavior. But note that you can see both at once with WHICH /A.
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,190
    Likes Received:
    11
    You can also specify the extension if you know what it is.
    Code:
    [C:\] which /a subst
    subst is an alias : "C:\TC17\psubst.btm"
    subst is an external : C:\Windows\system32\subst.exe
    
    [C:\] which subst.exe
    subst.exe is an external : C:\Windows\system32\subst.exe
    
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Or even if you don't:
    Code:
    C:\BIN\JPSDK\LEStuff>which /a less
    less is an alias : list
    less is an external : D:\bin\util\less.exe
    
    C:\BIN\JPSDK\LEStuff>which less.*
    less.* is an external : D:\bin\util\less.*
    
    C:\BIN\JPSDK\LEStuff>
    
     

Share This Page