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

Not requiring `aws` prefix seems to be causing confusion

Open donnemartin opened this issue 9 years ago • 7 comments

Although it seems like e1ven is reporting broken commands, I think the following report actually shows some confusion with not having to prefix commands with aws. Muscle memory could be an issue for veteran users. Also, I'd suspect you won't always have aws-shell up (maybe you're ssh'd into multiple EC2 machines doing various things which might/might not include aws-cli-backed-commands). The command syntax difference between aws-cli and aws-shell could lead to confusion in these cases.

e1ven

Several commands don't seem to return what I'd expect. With the command line, "aws s3api list-buckets" gives me a list of buckets.. With the aws-shell, this gives me "aws: error: argument command: Invalid choice, valid choices are"..

Reddit Source

Note: s3api list-buckets works for me.

donnemartin avatar Dec 17 '15 11:12 donnemartin

s3api list-buckets works fine, as you point out.

The docs are pretty clear about the proper syntax, I just wasn't picking up on the syntax, for thickheaded reasons :)

Throwing a "The aws command is not required" message to any command starting with "aws" might help guide people, but really, I should have RTFM.

e1ven avatar Dec 17 '15 18:12 e1ven

Throwing a "The aws command is not required" message to any command starting with "aws" might help guide people, but really, I should have RTFM.

I think this is an interesting suggestion. I'm not sure you're alone in not reading manuals :)

Curious to hear how users feel about not requiring aws.

donnemartin avatar Dec 18 '15 01:12 donnemartin

IMHO the aws, if present, should just be stripped out so that one can, say, copy-paste commands from the net with ease.

ztane avatar Dec 29 '15 06:12 ztane

Another idea I briefly discussed with @jamesls is introducing the concept of prefix scope, which will allow users to specify what prefix(es) will be automatically added. A new .command (for now let's call it .cs for 'change scope') would work like this:

aws> .cs !
> ls
my-local-file.txt
...
> aws s3 ls
2015-12-31 12:00:00 my-s3-bucket
...
> .cs aws
aws> s3 ls
2015-12-31 12:00:00 my-s3-bucket
...
aws> .cs aws s3
aws s3> ls
2015-12-31 12:00:00 my-s3-bucket
...
aws s3> .cs aws ec2
aws ec2> describe-instances
...

I think it'd be nice to also add a config variable for setting the default scope when aws-shell starts up.

petermoon avatar Jan 12 '16 08:01 petermoon

@petermoon I agree. This is essentially what's been requested here https://github.com/awslabs/aws-shell/issues/87

jamesls avatar Jan 12 '16 20:01 jamesls

Cool idea!

donnemartin avatar Jan 13 '16 02:01 donnemartin

Cisco CLI works this way in some effect.

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/begin.html

hholst80 avatar Jan 27 '20 21:01 hholst80