Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 8686] Error when running `gaze search <spell>`

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 8686] Error when running `gaze search <spell>`
  • Date: Tue, 7 Jun 2005 19:17:01 -0700 (PDT)

http://bugs.sourcemage.org/show_bug.cgi?id=8686





------- Additional Comments From acedit AT armory.com 2005-06-07 19:17 -------
Okay, finally had a chance to dig into the patches. I think that the proposed
solution (although correct) just dodges a bigger problem rather than fixing it
permanently. It looks like instead of looping on all spells, we first loop on
grimoires and in a nested loop, loop on all spells in that grimoire. Problem
is,
theres no guarentee that someday grimoires wont grow too large for the number
of
parameters.

I think the following works out better, and should only be a one line
modification.

replace this:
for file in `codex_get_all_spells | sed 's/$/\/DETAILS/' | xargs grep -il
$SEARCH`; do
with this:
codex_get_all_spells | sed 's/$/\/DETAILS/' | xargs grep -il $SEARCH | while
read file; do

The only tricky part about that structure is it is running in a pipe so
nothing
done inside the loop is visible outside. However in real_long_search() we
don't
care so its a non-issue. You could use a redirect from a file or process
substitution if it mattered.


--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




Archive powered by MHonArc 2.6.24.

Top of Page