Skip to content

feat: Allow escaping $ in OQL commands by doing $$#167

Merged
jasonk000 merged 1 commit intomasterfrom
jkoch/issue-143
Mar 4, 2026
Merged

feat: Allow escaping $ in OQL commands by doing $$#167
jasonk000 merged 1 commit intomasterfrom
jkoch/issue-143

Conversation

@jasonk000
Copy link
Copy Markdown
Contributor

fixes #143

Before

../org.eclipse.mat.product/target/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer/macosx/cocoa/aarch64/MemoryAnalyzer.app/Contents/Eclipse/ParseHeapDump.sh \
    ~/Downloads/heapdump.hprof \
    "-command=oql \"SELECT adder.base AS base, (SELECT cell.value AS value FROM OBJECTS ${adder}.cells[0:-1] cell ) AS cells FROM java.util.concurrent.atomic.LongAdder adder \"" \
    org.eclipse.mat.api:query
image

After -- note carefully the escaped \$ to avoid the shell modifying the $$.

../org.eclipse.mat.product/target/products/org.eclipse.mat.ui.rcp.MemoryAnalyzer/macosx/cocoa/aarch64/MemoryAnalyzer.app/Contents/Eclipse/ParseHeapDump.sh \
    ~/Downloads/heapdump.hprof \
    "-command=oql \"SELECT adder.base AS base, (SELECT cell.value AS value FROM OBJECTS \$\${adder}.cells[0:-1] cell ) AS cells FROM java.util.concurrent.atomic.LongAdder adder \"" \
    org.eclipse.mat.api:query
image

@jasonk000 jasonk000 merged commit 5763601 into master Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escaping $ references in OQL commands

2 participants