- # check both ac_word and ac_word.exe (for windows system)
- if os.path.isfile( os.path.join(ac_dir, ac_word) ) or \
- os.path.isfile( os.path.join(ac_dir, ac_word + ".exe") ):
- print ' yes'
- # write rc entries for this command
- if len(rc_entry) == 1:
- addToRC(rc_entry[0].replace('%%', ac_prog))
- elif len(rc_entry) > 1:
- addToRC(rc_entry[idx].replace('%%', ac_prog))
- return [ac_dir, ac_word]
+ for ext in extlist:
+ if os.path.isfile( os.path.join(ac_dir, ac_word + ext) ):
+ print ' yes'
+ # write rc entries for this command
+ if len(rc_entry) == 1:
+ addToRC(rc_entry[0].replace('%%', ac_prog))
+ elif len(rc_entry) > 1:
+ addToRC(rc_entry[idx].replace('%%', ac_prog))
+ return [ac_dir, ac_word]