Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ? to terminal for access to help #3833

Closed
dpsanders opened this issue Jul 25, 2013 · 11 comments
Closed

Add ? to terminal for access to help #3833

dpsanders opened this issue Jul 25, 2013 · 11 comments

Comments

@dpsanders
Copy link
Contributor

Coming from IPython, it has become a reflex to use command?, with ? at the end, to gain access to the help for command, i.e. as an alias for help(command).

This would be great (i.e., necessary for attracting Python users) to implement in julia.

@Keno
Copy link
Member

Keno commented Jul 25, 2013

We use ? as the ternary operator, so this probably won't happen, sorry.

@dpsanders
Copy link
Contributor Author

Oh, I see. Some other shortcut then? Typing help(...) is 5 characters too
many to type compared to ?

On Thu, Jul 25, 2013 at 11:35 AM, Keno Fischer notifications@github.comwrote:

We use ? as the ternary operator, so this probably won't happen, sorry.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3833#issuecomment-21574938
.

Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders@gmail.com
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965

@quinnj
Copy link
Member

quinnj commented Jul 25, 2013

I think ? at the beginning of the line was proposed as a shortcut to help. i.e.

?abs
Base.abs(x)

   Absolute value of "x"

This is what R does and would be in conjunction with ; being a shortcut to shell commands already. I don't recall what happened with this proposal though.

@johnmyleswhite
Copy link
Member

Following on @karbarcca's comment, placing ? at the start of a line (like R does) seems much saner than Python's convention.

If we're going to allow ? at the end of tokens (which requires removing the ternary operator used all over the code base), it should indicate predicates (as discussed several times before), not a call to help.

@Keno
Copy link
Member

Keno commented Jul 25, 2013

Yeah, I wouldn't mind that though I seem to recall there was some reason not to do it? @StefanKarpinski ?

@dpsanders
Copy link
Contributor Author

? at the beginning of the command would be fine. In fact, this also works
in IPython, but for some reason everybody puts it at the end!
I guess that's in the docs. I'll try and get the IPython docs changed to
put the ?s at the start.

On Thu, Jul 25, 2013 at 11:45 AM, Keno Fischer notifications@github.comwrote:

Yeah, I wouldn't mind that though I seem to recall there was some reason
not to do it? @StefanKarpinski https://github.com/StefanKarpinski ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/3833#issuecomment-21575614
.

Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders@gmail.com
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965

@StefanKarpinski
Copy link
Sponsor Member

I'm pretty sure that ? at the beginning of a line is ok.

@Keno
Copy link
Member

Keno commented Jul 25, 2013

Well, in that case, let's do that

Keno added a commit to Keno/REPL.jl that referenced this issue Jul 25, 2013
@quinnj
Copy link
Member

quinnj commented Jul 25, 2013

Can we include an easter egg like R? :)

R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> ????t.test
Contacting Delphi...the oracle is unavailable.
We apologize for any inconvenience.

@ViralBShah
Copy link
Member

This would be great. I always put the ? at the end in ipython too. Good to know that you can put it in the front too.

@milktrader
Copy link
Contributor

+1 for ?command

@nolta nolta closed this as completed in 70db8e7 Jul 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants