[Github-comments] [geany] Read standard input as new file (#780)

naturalspringwater notifications at xxxxx
Sat Nov 28 03:58:02 UTC 2015


Hello,

Well,
cat /dev/urandom | nano -
simply waits forever for stdin to run out which never does, but provides a message to send CTRL+C to cancel.

You are right, some strategy to handle encoding would make sense. For typical commands on linux it's a non-issue, but I can see the need, you can have unicode/intl. characters in filenames (of 'ls' output above) for example... but on my system "ls -l" can output unicode and nano outputs unicode, so... I don't remember how terminals and bash handle it.

I would expect to have to do the conversions myself. After the file opens, if geany can't heuristically tell the encoding from contents like other files (does it do that? I always work on the same kinds of files), I would simply select the encoding myself from the menu ("Set Encoding"), since the point is to have a GUI. I suppose a command line option to override which "Set Encoding" is selected when the file opens could be useful. But that could be a separate suggestion entirely...

Indeed I already tried "geany -" and it opens a file named dash.

@codebrainz I could probably make use of that script. The part I didn't think of is using a random filename. That would work.

Thanks for responding

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/780#issuecomment-160244693
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151127/655e9506/attachment.html>


More information about the Github-comments mailing list