mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[GH-ISSUE #681] Garbled text when pasting #963
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Cyb3rC3lt on GitHub (May 29, 2025).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/681
Expected behavior
Just paste with no issues
Versions:
I really really want this to work as it would be super useful for me as a pentester to back up my logs to a Share just in case Kali Linux crashes so I have all my client logs.
It does most of the time but when I paste text it sometimes just screws up the console. I have my Terminator console set to start recording on opening with an initial command as you can see below. But when I copy a piece of text from say Sublime it can mess it up on pasting and the text can jump up a line. Any ideas why this may be the case?
If you want to try and reproduce this is the offending piece of text as an example:
secretsdump.py -ntds /home/david/Tools/test.dit -system /home/david/Tools/SYSTEM LOCAL -outputfile ~/Tests/BS/dit.txt
If I drag the offending pane upwards (or enlarge it left) it seems to fix itself I just noticed but other times I could swear that the added text breaks the command. It seems quite random. It might work 5 times in a row then I open a new tab and it starts breaking.
Here it is working then I open a new pane underneath and although the command works fine you can understand I can't screenshot that for a client as it is all mangled compared to the command at the top. Hopefully you can provide some tips or a potential fix? Thanks
@ku1ik commented on GitHub (May 29, 2025):
Can you try with 3.0.0-rc.4? There were many bugfixes since rc.3 so there's a chance this is not longer an issue 🤞
@Cyb3rC3lt commented on GitHub (May 30, 2025):
Really thought that might solve it but no joy. Seems to be when you move further down the screen or something. Here it is failing on the 5th pane down and then when I move to a new tab it happened on the first one.
Its kinda like it builds up a gap slowly and the child panes inherit the gap and it increases until it breaks but I could be talking rubbish as I have no idea how it works to be honest.
Breaking on 5th attempt

Breaking in new tab:

@ku1ik commented on GitHub (Jun 1, 2025):
I tried to reproduce on my side but no luck. If you can answer the following question it may help us to close in on the bug:
asciinema recinstead of automatically running it via initial command?scriptcommand for recording instead of asciinema for the initial command?@Cyb3rC3lt commented on GitHub (Jun 3, 2025):
Here are the answers:
Given point 3 seems to be a workaround I will try this over the coming days and will report back. It could have solved it. Thanks for the tips.
@Cyb3rC3lt commented on GitHub (Jun 4, 2025):
I think I can fix the garbled text issue. Starting it automatically not via the gui but via zshrc with this seems to make a difference:
Auto-start asciinema recording and save to /mnt/hgfs/ConsoleLogs and auto-start asciinema recording if not already started in this shell
if -z "$ASCIINEMA_RECORDING_STARTED" && -t 1 ; then
export ASCIINEMA_RECORDING_STARTED=1
asciinema rec -i 0.001 --command="zsh" /mnt/hgfs/ConsoleLogs/$(date +%H-%M-%S_"%d-%m-%Y").cast
exit
fi
Before I go can I ask another question. I ssh to a lot of servers whilst testing and when I unpause a VM it will say rightfully my connection is broken to the ssh server that I may have left open before pausing it. So I get this in my console as expected:
And this from ascii
Are there any workarounds to keep it recording the same shell after the disconnection as it dies at that point when I replay it?
I also would like to replay my whole recording instantly like this, let me know if I can do it a better way please?
asciinema play -i 0.00000000001 /mnt/hgfs/ConsoleLogs/09-31-16_04-06-2025.castThanks
@Cyb3rC3lt commented on GitHub (Jun 6, 2025):
I will close this issue as the original one is fixed. Ssh connectivity can be another topic if needs be. Thanks for the help