<p>This emulates the bash <code>${varname:offset:length}</code> syntax allowing substring manipulation of settings values. It operates during the <code>fetchf_setting</code> stage so should work for show, echo and any form of setting substitution.</p>
<p>It extends the existing syntax like name:type:offset:length, e.g.</p>
<pre><code>show smbios/product:string:0:8
show smbios/uuid::0:24
echo ${ifname::3:4}
</code></pre>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/ipxe/ipxe/pull/95'>https://github.com/ipxe/ipxe/pull/95</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Parse ${name:offset:length} in setting values</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/95/files#diff-0">src/core/settings.c</a>
    (112)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/95/files#diff-1">src/include/ipxe/settings.h</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/ipxe/ipxe/pull/95.patch'>https://github.com/ipxe/ipxe/pull/95.patch</a></li>
  <li><a href='https://github.com/ipxe/ipxe/pull/95.diff'>https://github.com/ipxe/ipxe/pull/95.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ipxe/ipxe/pull/95?email_source=notifications&email_token=AAFNGVGZHWHTJE36CRRJA5DQHU6EFA5CNFSM4IS7AP42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI2KABQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFNGVCBD3LEJDLWDPFE4VTQHU6EFANCNFSM4IS7AP4Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAFNGVDO5MQGMIEFKHSIE73QHU6EFA5CNFSM4IS7AP42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI2KABQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ipxe/ipxe/pull/95?email_source=notifications\u0026email_token=AAFNGVGZHWHTJE36CRRJA5DQHU6EFA5CNFSM4IS7AP42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI2KABQ",
"url": "https://github.com/ipxe/ipxe/pull/95?email_source=notifications\u0026email_token=AAFNGVGZHWHTJE36CRRJA5DQHU6EFA5CNFSM4IS7AP42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HI2KABQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>