Author Topic: B6: %m escape sequence not working?  (Read 2898 times)

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
B6: %m escape sequence not working?
« on: October 06, 2014, 04:12:37 pm »
I'm trying to create a project build tool that can accept a user-provided argument and pass it to a custom shell script. I tried using the "%m" escape sequence for user prompts described here:

   http://community.slickedit.com/index.php?topic=5320.0

But it doesn't appear to work in the latest beta. My tool's command string looks like so:

   %wp/../build.sh %mqueryForValue% --output -

I tried both with the trailing "%" (as suggested in the post) and without, but no luck in either case.

Regards,
Iker

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 5549
  • Hero Points: 449
Re: B6: %m escape sequence not working?
« Reply #1 on: October 06, 2014, 04:59:37 pm »
The syntax might have changed slightly in v19. Look up escape sequences in the on line help index

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: B6: %m escape sequence not working?
« Reply #2 on: October 06, 2014, 05:52:32 pm »
Found it - the syntax has changed to this:

    %wp/../build.sh %(?prompt-text:initial value) --output -

However, this also fails to produce a prompt and the variable expands to the empty string.
The following variations failed as well:

  %(Prompt-text:initial value)
  %(prompt text:initial value)
  %(Prompt text:initial value)


Iker


Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 5549
  • Hero Points: 449
Re: B6: %m escape sequence not working?
« Reply #3 on: October 06, 2014, 09:45:31 pm »
Hmm...docs are not right on this one. Use this:

%(prompt  prompt-text:initial value)

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: B6: %m escape sequence not working?
« Reply #4 on: October 07, 2014, 02:35:49 am »
Thanks!

Iker

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: B6: %m escape sequence not working?
« Reply #5 on: October 07, 2014, 11:35:47 am »
Does the %(prompt) sequence provide a way to preserve the last entered prompt? The prompt escape is very useful for custom scripts with many targets but when there are errors one ends up calling it several times with the same argument (ie, build "x", fix errors, repeat a few times, move on to build "y", etc). Saving the last prompt would work out very well in this case.

Thanks again,
Iker

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 5549
  • Hero Points: 449
Re: B6: %m escape sequence not working?
« Reply #6 on: October 07, 2014, 06:16:07 pm »
Added %(last-prompt-result) to build escape sequences for next build.

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: B6: %m escape sequence not working?
« Reply #7 on: October 07, 2014, 07:00:38 pm »
Thanks!

Iker

IkerAriz

  • Senior Community Member
  • Posts: 148
  • Hero Points: 6
Re: B6: %m escape sequence not working?
« Reply #8 on: October 29, 2014, 10:22:28 pm »
The new %(last-prompt-result) escape sequence works great.

Thanks!

Iker