<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Microsoft Windows [Version 10.0.18362.239]"><pre lang="none" class="notranslate"><code class="notranslate">Microsoft Windows [Version 10.0.18362.239]
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Sorry, I don't figure out clearly but this step always make cmd.exe hang. At present, the method that can be reliably reproduced is to start vim.exe at the bottom line of cmd.exe.</p>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Do not hang.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Hang.</p>
<p dir="auto">FYI, I tried to run this code, but not reproduce.</p>
<div class="highlight highlight-source-c notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include &lt;windows.h&gt;

int
main(int argc, char* argv[]) {
	HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
	COORD coord;
	coord.X = 80;
	coord.Y = 300;
	SetConsoleScreenBufferSize(h, coord);
	return 0;
}"><pre class="notranslate"><span class="pl-k">#include</span> <span class="pl-s">&lt;windows.h&gt;</span>

<span class="pl-smi">int</span>
<span class="pl-en">main</span>(<span class="pl-smi">int</span> <span class="pl-s1">argc</span>, <span class="pl-smi">char</span><span class="pl-c1">*</span> <span class="pl-s1">argv</span>[]) {
	<span class="pl-smi">HANDLE</span> <span class="pl-s1">h</span> <span class="pl-c1">=</span> <span class="pl-en">GetStdHandle</span>(<span class="pl-c1">STD_OUTPUT_HANDLE</span>);
	<span class="pl-smi">COORD</span> <span class="pl-s1">coord</span>;
	<span class="pl-s1">coord</span>.<span class="pl-c1">X</span> <span class="pl-c1">=</span> <span class="pl-c1">80</span>;
	<span class="pl-s1">coord</span>.<span class="pl-c1">Y</span> <span class="pl-c1">=</span> <span class="pl-c1">300</span>;
	<span class="pl-en">SetConsoleScreenBufferSize</span>(<span class="pl-s1">h</span>, <span class="pl-s1">coord</span>);
	<span class="pl-k">return</span> <span class="pl-c1">0</span>;
}</pre></div>
<p dir="auto">There is a new feature that appears to automatically generate profiles based on existing WSL distributions.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6083371/65738178-e1f50600-e0d8-11e9-8ecf-6342fccd7be5.png"><img src="https://user-images.githubusercontent.com/6083371/65738178-e1f50600-e0d8-11e9-8ecf-6342fccd7be5.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I tried messing around with these automatically-generated profiles, and it looks like you can add additional parameters to them, but if you change the GUID, they are regenerated automatically, so I assume there is a hidden GUID associated with each WSL installation.</p>
<p dir="auto">However, when I used the wsl.exe -h, I couldn't find a way to verbosely print the GUID, although I assume it's stored somewhere in the registry.</p>
<p dir="auto">This "Source" feature as well as the specific profile generator "Windows.Terminal.Wsl" should probably be documented.</p>
<p dir="auto">For instance, I would like to be able to pass the <code class="notranslate">~</code> parameter, which tells wsl to launch in the Linux user's $HOME.  Is there a way to pass that parameter to the profile generator?  Can we build our own profile generators?</p>