aws-shell icon indicating copy to clipboard operation
aws-shell copied to clipboard

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

Open kennyk65 opened this issue 7 years ago • 17 comments

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

kennyk65 avatar Mar 01 '17 21:03 kennyk65

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.

donnemartin avatar Mar 02 '17 00:03 donnemartin

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?

kennyk65 avatar Mar 06 '17 04:03 kennyk65

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

softmonkeyjapan avatar Jun 27 '17 03:06 softmonkeyjapan

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?

joguSD avatar Jul 31 '17 20:07 joguSD

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.

jamesls avatar Aug 07 '17 22:08 jamesls

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.

jpz avatar Nov 04 '17 16:11 jpz

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

jleaders avatar Mar 23 '18 21:03 jleaders

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

ladydata avatar May 04 '18 19:05 ladydata

+1

sahas- avatar Oct 01 '18 21:10 sahas-

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

tdmalone avatar Mar 18 '19 03:03 tdmalone

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 !

JeffMangan avatar Oct 01 '19 22:10 JeffMangan

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.

leandropadua avatar Nov 15 '19 03:11 leandropadua

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.

progzilla avatar Jan 05 '20 14:01 progzilla

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?

hholst80 avatar Jan 27 '20 21:01 hholst80

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.

elkd avatar Feb 03 '20 07:02 elkd

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

kushthakker avatar Nov 09 '21 16:11 kushthakker

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

frctnlss avatar Feb 04 '22 21:02 frctnlss