Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

tab-completion weirdness with emoji

Jul
530
10
Is this a TCC or a Windows Terminal behavior? Is this even a bug?

Code:
echo. >"a file with % in it"
echo. >"a file with  in it"

Try renaming those files with tab-completion.

The pizza at least displays 2 dummy characters, so you can work with it.
The "cool percent" just absolutely does not display right at all when you tab complete it. You can’t work with it. I failed at renaming so may times I had to go into the GUI.

No clue if this is a WT or TCC thing, just thought I’d solicit opinions.


[separately, I really wish INKEY could be redirected with stdout+stderr combined without destroying emoji, but it can’t?]
 
Even more interesting.

If I am in C:\BAT\TEST\ in the example below, at a blank command line.

The mere act of hitting tab twice (the first time, it completes to the "lyrics" folder) on an empty command line ends up completing to Asian characters that absolutely are not files that exist, and the command-line as a whole crashes completely.

Reproduceable consistently for me.

But if I UNSET *, this doesn’t happen.

I have NOOOOOOOOOOO clue what’s going on with that.

For the life of me, I can’t see how any environment variable would affect things such that hitting tab on a blank command line crashes the command line if there is a filename with a pizza emoji in it.

It’s so perplexing (and interesting) to me.

1735052425038.webp
 
Here’s the BAT files you asked for :)

It definitely seems to be me causing it somehow with my environment.

I shared my environment, but yea, for the life of me, can’t make sense of this, even remotely.

Maybe there’s something affecting tab completion in my environment?
 

Attachments

And just for the record...

the 1ˢᵗ time, it completes to "lyrics", which is my sanity check

the 2ⁿᵈ time i hit tab, i get this:

1735054019746.webp


The 3ʳᵈ time i press tab, i get this:

1735054045210.webp



At this point, it will sit there forever, until I press a few keystrokes, at which point I get a crash-and-automatic-relaunch:

1735054122043.webp
 
And out of curiosity, what happens in CMD when you try to tab complete those files?

It behaves normally and performs the completions
 
What options have you enabled for your tab completion (OPTION / Command Line / Filename Completion)?

1735054773180.webp


Do you have CompleteAllFiles=Yes in your TCMD.INI?

I do not.


Do you have any custom tab completion routines? (I.e., with TABCOMPLETE or with plugins.)

Nope

Admittedly... my INI is probably the most shameful tcmd.ini in existence on planet earth. It’s been passed down for decades , messed with, scrambled in order in ways that parts don’t even work and i don’t know they don’t work, just a total mess:

 
Other things I tried:

Unsetting all aliases
Unsetting my prompt

Only unset * and killing my entire environment seems to prevent this behavior, which is so weird to me. But I think that’s because when i unset *, {tab} no longer completes to the files, just the folders, so it may just be that the problem is being avoided in that case, and thus not caused by my environment at all.
 
And oh! My font is Cascadia Code.
 
The problem is likely in your PATH; try unsetting just that. If you have the "Search PATH" option set, you're going to have thousands of possible matches when you TAB on an empty command line.
Oh my gosh. That makes sense.

But I can say with a fair amount (99.999%) of confidence that I do not have any files named , not even in lyric downloads.

Assuming the everything service works with these types of characters, I checked, and would have 100% confidence of nothing actually being named this. I also checked with the dir command and with windows search. I can’t find a single entity with 榀 (char 27008) anywhere in my file system.

* But you’re still right — Unsetting the path stopped the behavior. *

1) I am wondering if tab completion is somehow taking emoji or other characters and mistranslating them. Otherwise, how is it coming up with these names? One had ligatures on the bottom that extended 3 console rows down. I’d never even seen that rendering in my life, except maybe with "zalgo" text converters. Pretty sure that wasn’t a valid filesystem name, but tab is coming up with it

2) Even if it did exist, it definitely shouldn’t crash the command line.

3) Each time I do it, I get different characters. Tab should really complete to the same folder/file each time; it doesn’t have a random aspect that I know of and I don’t think these files are being created in between successive tests on my side as i ran 2 simultaneously.

I’m starting to wonder if it’s some kind of weird memory leak, otherwise why would it be different each time?

1735098375120.webp


1735098543147.webp

1735098549417.webp



You’re definitely onto something with the path business.

This is like a very compelling puzzle. Starting to see how the pieces fit together, but still not sure how to solve it.

1735097863342.webp



Merry Christmas!
 

Attachments

  • 1735098530460.webp
    1735098530460.webp
    2.5 KB · Views: 6
Note to self: Tried v34β and had same results
 
Hi, I had the same behavior in 34
 
Assuming the everything service works with these types of characters, I checked, and would have 100% confidence of nothing actually being named this. I also checked with the dir command and with windows search. I can’t find a single entity with 榀 (char 27008) anywhere in my file system.

Copying and pasting that character (榀) into Take Command v34.00.13 with Ctrl-V causes weird stuff to happen to my command line. (v33 is okay.)

Copying and pasting that character (榀) into TCC v34.00.13 (in a console window) with Ctrl-V also causes weird stuff to happen to my command line. Again, v33 is okay.

Copying and pasting that character into TCC v34.00.13 running in Windows Terminal with Ctrl-V... works as expected.

Okay, I'm confused.... Because Windows Terminal has its own Ctrl-V handler?
 
Windows terminal will screw up too. Copy that character and, from the Windows multi-clipboard (Win+V) paste it into Windows Terminal. When I do that at a new prompt in WT, I see this.

1735923124104.webp


If I paste again (from the multi-clip, having done nothing else) I see this.

1735923270456.webp


Pasting it here (the forum) or into CMD in WT is OK.
 
It's visually better after option //readconsole=Yes but other things get screwed up ... history recall and my yellow input setting.
 
FWIW, the mere act of pasting 榀 into 33.00.20 doesn’t break anything for me under Windows Terminal 1.22.3232.0
 
Back
Top