micro-editor / micro-editor/micro
Unability to open generalised "file descriptor" files eg: /proc/self/fd/xxx
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description
Many unices and unix-like OS-es support special directory in /proc (or elsewhere) to open inherited parent's proces file descriptors as files.
This is often used by advanced shell sub process redirection (bash, zsh and other more advanced shells).
Example:
$ nano <(ls)
# "opens" directory listing as editable buffer (incoming as "descriptor" file from shell, containing actual output of `ls`)
Unfortunately with micro this fails:
: micro <(ls)
Error: /proc/self/fd/11 is not a regular file and cannot be opened
Press enter to continue
micro is probably doing regular file check on it's input file argument and raw file descriptor fails this.
This might be some kind of protection.
However this should be at least specialcased for file prefixes like /proc/self/fd/* on linux, to allow for shell sub-process redirection to work.
Environment
- Version:
- OS:
- Terminal:
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
Start by reproducing the reported command, micro <(ls), and trace the input-file argument handling that rejects /proc/self/fd/11 as not a regular file. Review the existing file-opening checks and make the behavior work for the reported descriptor paths without breaking ordinary path validation; done means process-substitution input opens in micro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, go, linux, zsh
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100