micro-editor / micro-editor/micro
Micro fails to set correct mime-type for clipboard copy from perl files.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Micro specifies only application/x-perl mime-type and no text/plain for text copied from file that starts with #!/usr/bin/perl or #!/usr/bin/env perl.
Example file:
#!/usr/bin/perl
gives
$ wl-paste --list-types
application/x-perl
Correct behavior can be seen for bash files:
#!/usr/bin/bash
gives
$ wl-paste --list-types
application/x-shellscript
text/plain
text/plain;charset=utf-8
TEXT
STRING
UTF8_STRING
note: foo.pl/foo.sh without shebang give
$ wl-paste --list-types
text/plain
text/plain
text/plain;charset=utf-8
TEXT
STRING
UTF8_STRING
(with duplicate text/plain)
Note: i hadn't tested many shebangs, maybe issue is not exclusive to perl scripts.
micro -debug does not show anything
micro version: 98ff79dbcaff3df2f70e4c322f0b3d406f6ae698
environment: wayland
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report under Wayland with the shown Perl shebangs, using wl-paste --list-types, and compare the output with the bash example. Trace Micro's clipboard MIME-type handling from the copy action; done means Perl copies include text/plain and related text types without regressing the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, perl
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100