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 browser template docs #43

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 0 additions & 255 deletions granted/configuration.mdx

This file was deleted.

69 changes: 69 additions & 0 deletions granted/configuration/autocomplete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: "Autocompletion"
---

## Autocompletion

Granted has support for shell auto complete. We currently support zsh and fish, with plans to support [bash, and powershell](https://github.com/urfave/cli/tree/master/autocomplete) in the future. Please let us know of your interest by [opening an issue on GitHub](https://github.com/common-fate/granted/issues).

### Fish

Fish autocompletions can be created by running the following command, then following the prompts.

Note, This currently only provides command and flag autocompletion, it does not automatically list aws profiles with the assume command.
Let us know if you are using Fish and would like to see this added.

```
granted completion -s fish
```

### ZSH

ZSH autocompletion can be enabled by running the following command.

```
granted completion -s zsh
```

Type `assume` and press **tab** to see a list of your aws profiles.

```
assume
profile-1 profile-2 profile-3
```

Type `assume -` and press **tab** to see flag completions.

```
assume -
--active-role --duration --export --pt --unset --version -h -v
--ar --env --granted-active-aws-role-profile --region --update-checker-api-url -c -r
--auto-configure-shell --ex --help --service --url -d -s
--console --exec --pass-through --un --verbose -e -u
```

Type `assume -s ` and press **tab** to see service names.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there something required to enable this? I've run granted completion -s zsh but it doesn't seem to work


```
ct gd s3 sso
appsync cw grafana sagemaker states
athena ddb iam scrh stepfn
c9 dms l scrm tra
ce dx lambda secretsmanager trustedadvisor
cf eb mwaa securityhub vpc
cfn ebs param ses waf
cloudformation ec2 r53 sfn
cloudmap ecr rds sm
cloudwatch ecs redshift sns
config eks route53 ssm
```

Type `assume -r ` and press **tab** to see regions.

```
af-south-1 ap-south-1 eu-north-1 me-south-1 us-west-2
ap-east-1 ap-southeast-1 eu-south-1 sa-east-1
ap-northeast-1 ap-southeast-2 eu-west-1 us-east-1
ap-northeast-2 ca-central-1 eu-west-2 us-east-2
ap-northeast-3 eu-central-1 eu-west-3 us-west-1
```
Loading