Some characters are dropped when paste from clipboard #23067

Open
opened 2026-01-31 08:31:22 +00:00 by claunia · 0 comments
Owner

Originally created by @og900aero on GitHub (Mar 26, 2025).

Windows Terminal version

1.23.10732.0

Windows build number

10.0.26100.3476

Other Software

Debian 12 stable under WSL

Steps to reproduce

When you paste a text where the first character is one of the following, it will unpaste that character and put in some invisible character, because the cursor disappears there:
[ , ] , { , }

Example paste it to terminal, or text editor under terminal (nano, micro text editor etc):

[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

Expected Behavior

I should see this if everything is ok:

[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

Actual Behavior

I see problem:

In nano, micro or other text editor:

custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

If use cat -A for this file, then following show:

$
^[custom.ansible]$
description = "Ansible version"$
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)$
when = """ test -n "${ANSIBLE_HOME}" """$
format = "[$symbol$output]($style) "$

If I copy directly to the terminal:

^[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"
Originally created by @og900aero on GitHub (Mar 26, 2025). ### Windows Terminal version 1.23.10732.0 ### Windows build number 10.0.26100.3476 ### Other Software Debian 12 stable under WSL ### Steps to reproduce When you paste a text where the first character is one of the following, it will unpaste that character and put in some invisible character, because the cursor disappears there: [ , ] , { , } Example paste it to terminal, or text editor under terminal (nano, micro text editor etc): ``` [custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` ### Expected Behavior I should see this if everything is ok: ``` [custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` ### Actual Behavior I see problem: In nano, micro or other text editor: ``` custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` If use cat -A for this file, then following show: ``` $ ^[custom.ansible]$ description = "Ansible version"$ command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)$ when = """ test -n "${ANSIBLE_HOME}" """$ format = "[$symbol$output]($style) "$ ``` If I copy directly to the terminal: ``` ^[custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ```
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 08:31:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23067