<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>docs/config/lua/config/unicode_version.md - fork/wezterm @ termiz-0.23.3</title>
<meta name="description" content="docs/config/lua/config/unicode_version.md in fork/wezterm at termiz-0.23.3.">
<meta property="og:title" content="docs/config/lua/config/unicode_version.md - fork/wezterm @ termiz-0.23.3">
<meta property="og:description" content="docs/config/lua/config/unicode_version.md in fork/wezterm at termiz-0.23.3.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="termiz-0.23.3" data-tip="4bf28e253c0167102f07bfc7e7199c13eed98012">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/wezterm</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/wezterm</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">Wez Furlong</span><span class="commit-message" data-commit="84f7fb9f3b0deb192d45ee36257e5f329584b1fc">docs: add tags to a number of pages</span><span class="snapshot-sha sha" data-commit="84f7fb9f3b0deb192d45ee36257e5f329584b1fc">84f7fb9f3</span><time datetime="2023-04-08T07:48:40-07:00" title="2023-04-08 07:48:40 -0700">2023-04-08</time></p>
<header class="topbar"><details class="switcher"><summary>termiz-0.23.3</summary><div class="menu"><strong>branches</strong><a href="/fork/wezterm/ref/main/">main</a><strong>tags</strong><a href="/fork/wezterm/ref/termiz-0.23.1/">termiz-0.23.1</a><a href="/fork/wezterm/ref/termiz-0.23.2/">termiz-0.23.2</a><a class="current" href="/fork/wezterm/ref/termiz-0.23.3/">termiz-0.23.3</a><a href="/fork/wezterm/ref/termwiz-0.23.0/">termwiz-0.23.0</a><a href="/fork/wezterm/ref/termwiz-0.23.1/">termwiz-0.23.1</a><a href="/fork/wezterm/ref/termwiz-0.23.2/">termwiz-0.23.2</a><a href="/fork/wezterm/ref/termwiz-0.23.3/">termwiz-0.23.3</a><a href="/fork/wezterm/ref/vtparse-0.7.0/">vtparse-0.7.0</a><a class="all" href="/fork/wezterm/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/wezterm/">wezterm</a> / <a href="/fork/wezterm/ref/termiz-0.23.3/tree/docs/">docs</a> / <a href="/fork/wezterm/ref/termiz-0.23.3/tree/docs/config/">config</a> / <a href="/fork/wezterm/ref/termiz-0.23.3/tree/docs/config/lua/">lua</a> / <a href="/fork/wezterm/ref/termiz-0.23.3/tree/docs/config/lua/config/">config</a> / <span class="cur">unicode_version.md</span></nav>
<span class="view-stats"><span>3.9 KiB</span><span>109 lines</span></span><span class="actions"><a class="raw" href="/fork/wezterm/raw/f67d21f2edc4255d554f308e5320e41ddc584b56/docs/config/lua/config/unicode_version.md">raw</a></span></header>
<div class="markdown-view"><input type="radio" name="markdown-view" id="markdown-rendered" checked><label for="markdown-rendered">rendered</label><input type="radio" name="markdown-view" id="markdown-code"><label for="markdown-code">code</label><section class="readme rendered"><hr />
<p>tags:</p>
<ul>
<li>unicode</li>
</ul>
<hr />
<h1><code>unicode_version = 9</code></h1>
<p>{{since('20211204-082213-a66c61ee9')}}</p>
<p>Specifies the version of unicode that will be used when interpreting the
width/presentation of text.</p>
<p>This option exists because Unicode is an evolving specification that introduces
new features and that occasionally adjusts how existing features should be
handled.</p>
<p>For example, there were a number of unicode code points that had their width
changed between Unicode version 8 and version 9. This wouldn't be an issue
if all software was simultaneously aware of the change, but the reality is
that there is a lot of older software out there, and that even if your local
system is fully up to date, you might connect to a remote system vis SSH
that is running applications that use a different version of unicode than
your local system.</p>
<p>The impact of mismatching expectations of unicode width for a terminal emulator
is that text columns may no longer line up as the application author expected,
and/or that the cursor may appear to be in the wrong place when editing lines
or text in shells or text editors.</p>
<p>The <code>unicode_version</code> option defaults to unicode version 9 as that is the most
widely used version (from the perspective of width) at the time of writing,
which means that the default experience has the lowest chance of mismatched
expectations.</p>
<table><thead><tr><th>Unicode Version</th><th>Impact</th></tr></thead><tbody>
<tr><td>8 (or lower)</td><td>Some characters will be narrower than later versions</td></tr>
<tr><td>9-13</td><td>Some characters will be wider than in Unicode 8</td></tr>
<tr><td>14 (or higher)</td><td>Explicit Emoji or Text presentation selectors will be respected and make some characters wider or narrower than earlier versions, depending on the context</td></tr>
</tbody></table>
<p>If you aggressively maintain all of your software to the latest possible
versions then you may wish to set <code>unicode_version = 14</code> to match the current
(at the time of writing) version of Unicode.  This will enable Emoji
Presentation selectors to affect the presentation of certain emoji characters
and alter their width in the terminal display.</p>
<p>If you'd like to use a higher default version but switch to a lower version
when launching an older application, or when SSH'ing into a remote host, then
you may be pleased to learn that wezterm also provides an escape sequence that
allows the unicode version to be changed on the fly.</p>
<h2>Unicode Version Escape sequence</h2>
<p>This escape sequence is was originally defined by iTerm2. It supports setting
the value as well as pushing and popping the value on a stack, which is helpful
when temporarily adjusting the value.</p>
<pre>OSC 1337 ; UnicodeVersion=N ST
</pre>
<p>The above sets the unicode version to <code>N</code>, where N is the integer version number.</p>
<pre>OSC 1337 ; UnicodeVersion=push ST
</pre>
<p>Pushes the current version onto a stack.</p>
<pre>OSC 1337 ; UnicodeVersion=pop ST
</pre>
<p>Pops the last-pushed version from the stack and sets the unicode version to that value.
If there were no entries on the stack, the unicode version is left unchanged.</p>
<pre>OSC 1337 ; UnicodeVersion=push LABEL ST
</pre>
<p>Pushes the current version onto a stack, labeling it with <code>LABEL</code>.</p>
<pre>OSC 1337 ; UnicodeVersion=pop LABEL ST
</pre>
<p>Pops entries from the stack stopping after an entry labelled with <code>LABEL</code> is popped.</p>
<p>The labels are helpful when writing a wrapper alias, for example:</p>
<pre class="language-bash"><a-k>function</a-k> <a-f>run_with_unicode_version_9</a-f>() {
  local <a-pr>label</a-pr>=<a-eb>$(</a-eb><a-f>uuidgen</a-f><a-eb>)</a-eb>
  <a-f>printf</a-f> <a-s>&quot;\e]1337;UnicodeVersion=push %s\e\\&quot;</a-s> <a-o>$</a-o><a-pr>label</a-pr>
  <a-f>printf</a-f> <a-s>&quot;\e]1337;UnicodeVersion=9\e\\&quot;</a-s>
  <a-f>eval</a-f> <a-o>$</a-o>@
  local <a-pr>result</a-pr>=<a-eb>${</a-eb><a-pr>PIPESTATUS</a-pr><a-eb>[0]}</a-eb>
  <a-f>printf</a-f> <a-s>&quot;\e]1337;UnicodeVersion=pop %s\e\\&quot;</a-s> <a-o>$</a-o><a-pr>label</a-pr>
  <a-f>return</a-f> <a-o>$</a-o><a-pr>result</a-pr>
}

<a-c># Connect to a remote machine with an older version of unicode</a-c>
<a-f>run_with_unicode_version_9</a-f> ssh remote.machine</pre>
<p>Will save the current version on the stack with a unique label, then set the version to <code>9</code>
and spawn the requested command.  When the command returns it will restore the saved
version, even if the command itself set or pushed other values.</p>
</section><div class="code-panel"><pre class="code src language-markdown"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"><a-p>---</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"><a-pr>tags</a-pr><a-p>:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text">  <a-p>-</a-p> <a-s>unicode</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text"><a-p>---</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text"><a-p>#</a-p> <a-tt>`unicode_version = 9`</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text">{{since(&#39;20211204-082213-a66c61ee9&#39;)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text">Specifies the version of unicode that will be used when interpreting the</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text">width/presentation of text.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">This option exists because Unicode is an evolving specification that introduces</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">new features and that occasionally adjusts how existing features should be</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">handled.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text">For example, there were a number of unicode code points that had their width</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text">changed between Unicode version 8 and version 9. This wouldn&#39;t be an issue</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text">if all software was simultaneously aware of the change, but the reality is</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text">that there is a lot of older software out there, and that even if your local</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">system is fully up to date, you might connect to a remote system vis SSH</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text">that is running applications that use a different version of unicode than</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">your local system.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">The impact of mismatching expectations of unicode width for a terminal emulator</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">is that text columns may no longer line up as the application author expected,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text">and/or that the cursor may appear to be in the wrong place when editing lines</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text">or text in shells or text editors.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text">The `unicode_version` option defaults to unicode version 9 as that is the most</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text">widely used version (from the perspective of width) at the time of writing,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text">which means that the default experience has the lowest chance of mismatched</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text">expectations.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L34" href="#L34">34</a><span class="code-text">| Unicode Version | Impact |</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L35" href="#L35">35</a><span class="code-text">| --------------- | ------ |</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L36" href="#L36">36</a><span class="code-text">| 8 (or lower)    | Some characters will be narrower than later versions |</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L37" href="#L37">37</a><span class="code-text">| 9-13            | Some characters will be wider than in Unicode 8 |</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L38" href="#L38">38</a><span class="code-text">| 14 (or higher)  | Explicit Emoji or Text presentation selectors will be respected and make some characters wider or narrower than earlier versions, depending on the context |</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L39" href="#L39">39</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L40" href="#L40">40</a><span class="code-text">If you aggressively maintain all of your software to the latest possible</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L41" href="#L41">41</a><span class="code-text">versions then you may wish to set `unicode_version = 14` to match the current</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L42" href="#L42">42</a><span class="code-text">(at the time of writing) version of Unicode.  This will enable Emoji</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L43" href="#L43">43</a><span class="code-text">Presentation selectors to affect the presentation of certain emoji characters</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L44" href="#L44">44</a><span class="code-text">and alter their width in the terminal display.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L45" href="#L45">45</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L46" href="#L46">46</a><span class="code-text">If you&#39;d like to use a higher default version but switch to a lower version</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L47" href="#L47">47</a><span class="code-text">when launching an older application, or when SSH&#39;ing into a remote host, then</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L48" href="#L48">48</a><span class="code-text">you may be pleased to learn that wezterm also provides an escape sequence that</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L49" href="#L49">49</a><span class="code-text">allows the unicode version to be changed on the fly.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L50" href="#L50">50</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L51" href="#L51">51</a><span class="code-text"><a-p>##</a-p> <a-tt>Unicode Version Escape sequence</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L52" href="#L52">52</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L53" href="#L53">53</a><span class="code-text">This escape sequence is was originally defined by iTerm2. It supports setting</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L54" href="#L54">54</a><span class="code-text">the value as well as pushing and popping the value on a stack, which is helpful</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L55" href="#L55">55</a><span class="code-text">when temporarily adjusting the value.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L56" href="#L56">56</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L57" href="#L57">57</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L58" href="#L58">58</a><span class="code-text"><a-p>OSC 1337 ; UnicodeVersion=N ST</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L59" href="#L59">59</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L60" href="#L60">60</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L61" href="#L61">61</a><span class="code-text"><a-p>The above sets the unicode version to `N`, where N is the integer version number.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L62" href="#L62">62</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L63" href="#L63">63</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L64" href="#L64">64</a><span class="code-text"><a-p>OSC 1337 ; UnicodeVersion=push ST</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L65" href="#L65">65</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L66" href="#L66">66</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L67" href="#L67">67</a><span class="code-text"><a-p>Pushes the current version onto a stack.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L68" href="#L68">68</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L69" href="#L69">69</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L70" href="#L70">70</a><span class="code-text"><a-p>OSC 1337 ; UnicodeVersion=pop ST</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L71" href="#L71">71</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L72" href="#L72">72</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L73" href="#L73">73</a><span class="code-text"><a-p>Pops the last-pushed version from the stack and sets the unicode version to that value.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L74" href="#L74">74</a><span class="code-text"><a-p>If there were no entries on the stack, the unicode version is left unchanged.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L75" href="#L75">75</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L76" href="#L76">76</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L77" href="#L77">77</a><span class="code-text"><a-p>OSC 1337 ; UnicodeVersion=push LABEL ST</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L78" href="#L78">78</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L79" href="#L79">79</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L80" href="#L80">80</a><span class="code-text"><a-p>Pushes the current version onto a stack, labeling it with `LABEL`.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L81" href="#L81">81</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L82" href="#L82">82</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L83" href="#L83">83</a><span class="code-text"><a-p>OSC 1337 ; UnicodeVersion=pop LABEL ST</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L84" href="#L84">84</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L85" href="#L85">85</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L86" href="#L86">86</a><span class="code-text"><a-p>Pops entries from the stack stopping after an entry labelled with `LABEL` is popped.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L87" href="#L87">87</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L88" href="#L88">88</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L89" href="#L89">89</a><span class="code-text"><a-p>The labels are helpful when writing a wrapper alias, for example:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L90" href="#L90">90</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L91" href="#L91">91</a><span class="code-text"><a-p>```</a-p><a-tl>bash</a-tl></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L92" href="#L92">92</a><span class="code-text"><a-p>function </a-p><a-f>run_with_unicode_version_9</a-f><a-p>() {</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L93" href="#L93">93</a><span class="code-text"><a-p>  local </a-p><a-pr>label</a-pr><a-p>=</a-p><a-eb>$(</a-eb><a-f>uuidgen</a-f><a-eb>)</a-eb></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L94" href="#L94">94</a><span class="code-text"><a-p>  </a-p><a-f>printf</a-f><a-p> </a-p><a-s>&quot;\e]1337;UnicodeVersion=push %s\e\\&quot;</a-s><a-p> </a-p><a-o>$</a-o><a-pr>label</a-pr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L95" href="#L95">95</a><span class="code-text"><a-p>  </a-p><a-f>printf</a-f><a-p> </a-p><a-s>&quot;\e]1337;UnicodeVersion=9\e\\&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L96" href="#L96">96</a><span class="code-text"><a-p>  </a-p><a-f>eval</a-f><a-p> </a-p><a-o>$</a-o><a-p>@</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L97" href="#L97">97</a><span class="code-text"><a-p>  local </a-p><a-pr>result</a-pr><a-p>=</a-p><a-eb>${</a-eb><a-pr>PIPESTATUS</a-pr><a-eb>[0]}</a-eb></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L98" href="#L98">98</a><span class="code-text"><a-p>  </a-p><a-f>printf</a-f><a-p> </a-p><a-s>&quot;\e]1337;UnicodeVersion=pop %s\e\\&quot;</a-s><a-p> </a-p><a-o>$</a-o><a-pr>label</a-pr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L99" href="#L99">99</a><span class="code-text"><a-p>  </a-p><a-f>return</a-f><a-p> </a-p><a-o>$</a-o><a-pr>result</a-pr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L100" href="#L100">100</a><span class="code-text"><a-p>}</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L101" href="#L101">101</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L102" href="#L102">102</a><span class="code-text"><a-p># Connect to a remote machine with an older version of unicode</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L103" href="#L103">103</a><span class="code-text"><a-p>run_with_unicode_version_9 ssh remote.machine</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L104" href="#L104">104</a><span class="code-text"><a-p>```</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L105" href="#L105">105</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L106" href="#L106">106</a><span class="code-text">Will save the current version on the stack with a unique label, then set the version to `9`</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L107" href="#L107">107</a><span class="code-text">and spawn the requested command.  When the command returns it will restore the saved</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L108" href="#L108">108</a><span class="code-text">version, even if the command itself set or pushed other values.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L109" href="#L109">109</a><span class="code-text"></span></span></pre></div></div>
</main>
</body>
</html>
