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

Comments

Projects
None yet
7 participants
@dpsanders
Contributor

dpsanders commented Jul 25, 2013

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

This comment has been minimized.

Show comment
Hide comment
@Keno

Keno Jul 25, 2013

Member

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

Member

Keno commented Jul 25, 2013

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

@dpsanders

This comment has been minimized.

Show comment
Hide comment
@dpsanders

dpsanders Jul 25, 2013

Contributor

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/JuliaLang/julia/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

Contributor

dpsanders commented Jul 25, 2013

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/JuliaLang/julia/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

This comment has been minimized.

Show comment
Hide comment
@quinnj

quinnj Jul 25, 2013

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite Jul 25, 2013

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.

Member

johnmyleswhite commented Jul 25, 2013

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

This comment has been minimized.

Show comment
Hide comment
@Keno

Keno Jul 25, 2013

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@dpsanders

dpsanders Jul 25, 2013

Contributor

? 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/JuliaLang/julia/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

Contributor

dpsanders commented Jul 25, 2013

? 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/JuliaLang/julia/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

This comment has been minimized.

Show comment
Hide comment
@StefanKarpinski

StefanKarpinski Jul 25, 2013

Member

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

Member

StefanKarpinski commented Jul 25, 2013

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

@Keno

This comment has been minimized.

Show comment
Hide comment
@Keno

Keno Jul 25, 2013

Member

Well, in that case, let's do that

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

This comment has been minimized.

Show comment
Hide comment
@quinnj

quinnj Jul 25, 2013

Member

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.
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

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah Jul 26, 2013

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.

Member

ViralBShah commented Jul 26, 2013

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

This comment has been minimized.

Show comment
Hide comment
@milktrader

milktrader Jul 26, 2013

Member

+1 for ?command

Member

milktrader commented Jul 26, 2013

+1 for ?command

@nolta nolta closed this in 70db8e7 Jul 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment