New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paste via right click append strange data (a path) #225

Closed
kayasax opened this Issue Jul 24, 2015 · 11 comments

Comments

Projects
None yet
4 participants
@kayasax

kayasax commented Jul 24, 2015

Hi, I've got a really strange behavior with conemu today.
I've this text in my clipboard :

    $array|foreach{
            if ($_ -match $str){
            echo "$str is a substring of $_"
        }
    }

Now, when I right click in conemu a path is inserted and result in

>>> if ($_ -match $str){              
>>> echo "$str is a substring of $_"  
>>> .\.android\}                      
>>> }

when opening a new tab with cmd shell and right click :

C:\Users\xxx>$array|foreach{                                     
'$array' n’est pas reconnu en tant que commande interne                  
ou externe, un programme exécutable ou un fichier de commandes.          

C:\Users\xxx>AppDataif ($_ -match $str){                         
'AppDataif' n’est pas reconnu en tant que commande interne               
ou externe, un programme exécutable ou un fichier de commandes.          

C:\Users\xxx>"Application Data"echo "$str is a substring of $_"  
'"Application Data"echo' n’est pas reconnu en tant que commande interne  
ou externe, un programme exécutable ou un fichier de commandes.          

Any idea ?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 24, 2015

Owner

What is the error you think?

Owner

Maximus5 commented Jul 24, 2015

What is the error you think?

@kayasax

This comment has been minimized.

Show comment
Hide comment
@kayasax

kayasax Jul 24, 2015

why the hell a path is inserted in the middle of the text ?? sometimes it's .\appdata, sometimes .\android etc.

kayasax commented Jul 24, 2015

why the hell a path is inserted in the middle of the text ?? sometimes it's .\appdata, sometimes .\android etc.

@elijahgagne

This comment has been minimized.

Show comment
Hide comment
@elijahgagne

elijahgagne Jul 24, 2015

I deal with this all the time and it's because of an issue with PSReadline (lzybkr/PSReadLine#77). You can run "rmo psreadline" to disable that extension and I bet this issue no longer occurs for you. This is not an issue with ConEmu, you can verify that by opening normally PowerShell and confirming it has the same behavior.

My solution is to have two ConEmu tabs open all the time. One with PSReadline and one without it.
-EWG

elijahgagne commented Jul 24, 2015

I deal with this all the time and it's because of an issue with PSReadline (lzybkr/PSReadLine#77). You can run "rmo psreadline" to disable that extension and I bet this issue no longer occurs for you. This is not an issue with ConEmu, you can verify that by opening normally PowerShell and confirming it has the same behavior.

My solution is to have two ConEmu tabs open all the time. One with PSReadline and one without it.
-EWG

@kayasax

This comment has been minimized.

Show comment
Hide comment
@kayasax

kayasax Jul 24, 2015

Thank you I confirm that I use PSReadline (for months, and today is the first time that I see this).
Sorry to have blamed ConEmu ;)

kayasax commented Jul 24, 2015

Thank you I confirm that I use PSReadline (for months, and today is the first time that I see this).
Sorry to have blamed ConEmu ;)

@kayasax kayasax closed this Jul 24, 2015

@xylographe

This comment has been minimized.

Show comment
Hide comment
@xylographe

xylographe Jul 24, 2015

Contributor

Perhaps, ConEmu could provide an option to expand TABs when pasting?
Or just replace TAB with SPACE?

Contributor

xylographe commented Jul 24, 2015

Perhaps, ConEmu could provide an option to expand TABs when pasting?
Or just replace TAB with SPACE?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 24, 2015

Owner

I consider this suggestion is good. As an option of course.

Owner

Maximus5 commented Jul 24, 2015

I consider this suggestion is good. As an option of course.

@kayasax

This comment has been minimized.

Show comment
Hide comment
@kayasax

kayasax Jul 24, 2015

that's strange though the problem is equal using cmd.exe in ConEmu (open antoher tab of ConEmu, after the powershell's tab) ...

kayasax commented Jul 24, 2015

that's strange though the problem is equal using cmd.exe in ConEmu (open antoher tab of ConEmu, after the powershell's tab) ...

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 24, 2015

Owner

Because cmd.exe is processing Tab completion too. Do you wonder that it "process" Enter keypresses? I don't think so. The same as Tab key.

Pasting bad text may tell your shell to do bad things.

Owner

Maximus5 commented Jul 24, 2015

Because cmd.exe is processing Tab completion too. Do you wonder that it "process" Enter keypresses? I don't think so. The same as Tab key.

Pasting bad text may tell your shell to do bad things.

@kayasax

This comment has been minimized.

Show comment
Hide comment
@kayasax

kayasax Jul 24, 2015

@Maximus5 so it still not clear to me if the problem belongs to ConEmu or PSReadline? Moreover, using Ctrl+V paste only the first line of my clipboard

kayasax commented Jul 24, 2015

@Maximus5 so it still not clear to me if the problem belongs to ConEmu or PSReadline? Moreover, using Ctrl+V paste only the first line of my clipboard

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 24, 2015

Owner

The problem? The problem is that your text contains special characters which are processed by shells. ConEmu is not guilty that you are trying to paste "bad" text.

Owner

Maximus5 commented Jul 24, 2015

The problem? The problem is that your text contains special characters which are processed by shells. ConEmu is not guilty that you are trying to paste "bad" text.

@kayasax

This comment has been minimized.

Show comment
Hide comment
@kayasax

kayasax Jul 24, 2015

OK thank you for the precision

kayasax commented Jul 24, 2015

OK thank you for the precision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment