Dasonk / docstring

Provides docstring like functionality to R functions without requiring the need to create a package.
57 stars 6 forks source link

Please make docstring work in the terminal #7

Closed nfultz closed 7 years ago

nfultz commented 7 years ago

It doesn't seem to work when I run R from the terminal.

Dasonk commented 7 years ago

Interesting. I've only tested on Windows but ideally it should work in any terminal. What is your output from Sys.info() if I might ask?

nfultz commented 7 years ago

oops

nfultz commented 7 years ago
> Sys.info()
                                      sysname
                                      "Linux"
                                      release
                         "3.13.0-112-generic"
                                      version
"#159-Ubuntu SMP Fri Mar 3 15:26:07 UTC 2017"
                                     nodename
                "nfultz.dev.openmail.company"
                                      machine
                                     "x86_64"
                                        login
                                     "nfultz"
                                         user
                                     "nfultz"
                               effective_user
                                     "nfultz"
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
> Sys.getenv('TERM')
[1] "screen"
Dasonk commented 7 years ago

Thanks. I run Linux exclusively at home so have been meaning to implement this but it's always good to know that there are others out there too. So the html help didn't show up though? I would have thought it should show up even on linux. Although that makes me wonder... does

browseURL("www.google.com")

open up a browser for you? I wonder if the issue is that there might not be a default browser set on your system so it doesn't know how to open the local html.

nfultz commented 7 years ago

I'm running it on an ec2 box I ssh into, so it get's piped into $PAGER or something.

On Tue, Mar 14, 2017 at 12:01 PM, Dason Kurkiewicz <notifications@github.com

wrote:

Thanks. I run Linux exclusively at home so have been meaning to implement this but it's always good to know that there are others out there too. So the html help didn't show up though? I would have thought it should show up even on linux. Although that makes me wonder... does

browseURL("www.google.com")

open up a browser for you? I wonder if the issue is that there might not be a default browser set on your system so it doesn't know how to open the local html.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dasonk/docstring/issues/7#issuecomment-286526597, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZjTvH0ClXgnqP1V3F6_4eqina0DI_dks5rluQZgaJpZM4Mc0-T .

Dasonk commented 7 years ago

Ok that makes sense. Shouldn't be too bad to display in a terminal. I just need to add support for the text type (which should be like two lines of code which I can do when I get home)

Dasonk commented 7 years ago

Just checked on my home desktop and terminal support works for me after commit 381f87864042843927cc1ca6965945f2a3c4434a

Can you comment on if it works for you or not? Thanks.

nfultz commented 7 years ago

Works for me now.

On Wed, Mar 15, 2017 at 1:02 PM, Dason Kurkiewicz notifications@github.com wrote:

Just checked on my home desktop and terminal support works for me after commit 381f878 https://github.com/Dasonk/docstring/commit/381f87864042843927cc1ca6965945f2a3c4434a

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dasonk/docstring/issues/7#issuecomment-286861720, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZjTi14uyFidNB7KxfGB5-g7NdYUO-Hks5rmEPlgaJpZM4Mc0-T .

Dasonk commented 7 years ago

Great. Only thing left that I want to do before releasing to CRAN is making a vignette.