Author Topic: Change path to grep when using vi-filter  (Read 3347 times)

duffin

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Change path to grep when using vi-filter
« on: November 02, 2006, 07:25:05 pm »
I just started using SlickEdit and would like a way to specify my environment when using external commands.

More specifically:
I'm using vi-filter (!! in vi mode) to pipe the grep's output to my slickedit buffer. The problem is visual slickedit's grep is being used instead of the version I have defined elsewhere in my system path. I think its because when vi-filter is ran, it's current working directory is c:\program files\slickedit\win which contains "Slick Grep" (grep.exe).

My problem is that I want to tell SlickEdit which grep to use. However, at the same time I don't want to clobber other functions that use slickedit's version of grep.

I'm hoping there's a solution to this that doesn't require me changing macros. I would like the original product to stay intact as much as possible (if possible).

Thanks for any advice!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4896
  • Hero Points: 399
Re: Change path to grep when using vi-filter
« Reply #1 on: November 03, 2006, 07:27:39 pm »
I'm fairly certain that it's safe to just rename grep.exe to sgrep.exe.  No macro I know of is hard wired to run SlickEdit grep.  One minor problem is that if you type "sgrep" in the process buffer, it won't output some path information which is needed after changing the current directory and then using next-error.  You can modify the Slick-C variable "def_error_info_commands" (Macro>Set Macro Variable") to fix this.

duffin

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Change path to grep when using vi-filter
« Reply #2 on: November 06, 2006, 06:11:05 pm »
Clark,

Your suggestions have been working great so far. Thanks!