awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.22k stars 779 forks source link

Make "exit" or "quit" get you out of the shell #171

Open kennyk65 opened 7 years ago

kennyk65 commented 7 years ago

ctrl-D? Who would guess that. Make it easier by supporting common sense notions for leaving the shell.

donnemartin commented 7 years ago

Hi @kennyk65, aws-shell has dot commands so running either of the following commands will terminate the shell:

aws> .quit
aws> .exit

In the README we make note of .cd and .profile but not .quit/.exit.

I think we could probably make these commands more discoverable.

kennyk65 commented 7 years ago

I would never guess to try ".exit" or ".quit". Why force customers to look in the documentation when they only wish to leave the tool?

softmonkeyjapan commented 7 years ago

@donnemartin or maybe just do like EVERYONE is doing, provide a quit and/or exit methods. Seriously!!

joguSD commented 7 years ago

I can definitely understand the frustration behind not being able to exit the shell. The problem with allowing arbitrary commands is the potential for naming collisions with services under the aws command. The idea is that the commands you type are under the prefix aws and thus just exit would equate to aws exit. If we make a special exception for some commands and not others may only further confusion. That being said, such a fundamental command may be worthy of the exception. @jamesls Any thoughts on this?

jamesls commented 7 years ago

Yeah, I'm interested in a better solution here, but I think we should at least start with documenting .quit and .exit. While it seems highly unlikely there will ever be an exit or quit command in the AWS CLI (i.e aws exit), it does make things inconsistent with the way that namespace is used for other services (e.g aws ec2 ...).

Checking out a few existing REPLs: python, node don't have quit/exit commands, but irb and ipython do. It seems like it's not entirely consistent to always add quit/exit commands.

I'd say, let's leave this issue open. If people feel strongly about this, please +1 this issue. That will help give us feedback if people want this or are fine with the .quit/.exit commands. I think that's probably the best way to decide.

jpz commented 7 years ago

Alternatively, some guidance on how to discover the dot commands when first starting up would be good - ipython for instance tells you "press ?" to know more. The design of the .exit / .quit makes sense, but are not easily discoverable.

On the other hand, it didn't me long to discover ^D, after quit and exit didn't work, it was the next obvious go-to, though this might be less obvious to Windows users (and in which case it would likely be ^Z)

It does seem annoying that "exit" doesn't work however, personally I'd prefer to see that additionally supported, alternatively - describing the presence of the .dot commands and how to bring up a quickref for them (e.g. "?") would be a workable alternative.

jleaders commented 6 years ago

I've been using AWS Shell for several weeks now, mostly because I can't figure out how to exit it.

ladydata commented 6 years ago

Ironically, the only place I could find info about how to quit the terminal is... this Github issue!

sahas- commented 6 years ago

+1

tdmalone commented 5 years ago

What about support for Ctrl+C? That's the first thing I tried...

JeffMangan commented 5 years ago

I would never guess to try ".exit" or ".quit". Why force customers to look in the documentation when they only wish to leave the tool?

Because I have to install "Cheese" in order to use my webcam with Ubuntu. Sounds pretty obvious to me eh !

leandropadua commented 5 years ago

I've just installed it on mac and I've noticed when I started, it creates a bar on the bottom:

[F2] Fuzzy: ON  [F3] Keys: Emacs  ...  [F10] Exit 

hence, pressing F10 (or fn + F10 on new macs) also exit the shell.

progzilla commented 4 years ago

I've just installed it on mac and I've noticed when I started, it creates a bar on the bottom:

[F2] Fuzzy: ON  [F3] Keys: Emacs  ...  [F10] Exit 

hence, pressing F10 (or fn + F10 on new macs) also exit the shell.

Interestingly this doesn't work for Linux but i found .q helped out.

hholst80 commented 4 years ago

Why did the F10 not work on "Linux"? Is it captured by the terminal emulator? Try Esc 0 or try running aws-shell from the TTY?

elkd commented 4 years ago

F10 on ubuntu opens the top menu bar of the terminal. I just installed the package and the interesting thing is that this issue is still opened for almost 3 years now and l landed here just to help myself exit. How hard is it to make Ctrl+C for exit and make Ctrl+D for keyboard interrupt? It should be 2 line edit on code and docs.

kushthakker commented 3 years ago

I am trying to figure how to quit aws cli on my mac for weeks and eventually I landed here. Does anyone know how to exit/quit it??

frctnlss commented 2 years ago

@jamesls

Checking out a few existing REPLs: python, node don't have quit/exit commands, but irb and ipython do. It seems like it's not entirely consistent to always add quit/exit commands.

I do agree that the exit is not consistent, but to the point of python, it has quit() which I did try. I also have the issue with F10 on linux. Requiring to dive into tty on a linux desktop does not seem reasonable as it takes you away from the standard process. It is also incredibly inconvenient when working with multiple screens for productivity.

I did not know that python had a CTRL+D exit just like this does, but to that effect, if I type in quit for python then it tells me what i did wrong. There isn't any documentation from within the tool on how to quit. I didn't even notice the bar at the bottom that notates F10 as the exit option.

I believe that an appropriate solution to this would be to include the shell specific commands/options available in the shell when there is an issue. The standard AWS ones are already there and at the bottom it could have a heading noting the differentiation between aws-cli commands and aws-shell ones.

Alternatively, there are other valid options presented within this, like adding support for CTRL+C. You could also allow the python command quit() if you are targeting a compatibility with the underlying tooling. I still lean towards an option that grants discover-ability within the tool so that these questions are not here.