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

How to? How to prevent filename completion for some file types?

Discussion in 'Support' started by Rodolfo, Oct 29, 2013.

  1. Rodolfo

    Joined:
    May 20, 2009
    Messages:
    213
    Likes Received:
    0
    I would like to know if there is a way to prevent filename completion, for example to prevent type command on executable files. Something like "set filecompletion=cd:dirs; type:!exe". So that if I use the
    command "type saver" and then I press the tab key, it finds "saver.log" but not "saver.exe".

    Thank You and regards

    Rodolfo Giovanninetti
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,809
    Likes Received:
    82
    Yes, by using "!exe".

    However, you can't just tell it what not to match, you have to provide something *to* match. For example:

    Code:
    set filecompletion=type:!exe *
    Which will match everything except exe's.
     
  3. Rodolfo

    Joined:
    May 20, 2009
    Messages:
    213
    Likes Received:
    0
    Thank You, it worked perfectly.

    Regards

    Rodolfo Giovanninetti
     
  4. Rodolfo

    Joined:
    May 20, 2009
    Messages:
    213
    Likes Received:
    0
    Also, You might want to add this description, with a complete example, to the help, at least I could not find anything.


    Thank You again and regards

    Rodolfo Giovanninetti
     

Share This Page