1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-30 13:47:46 +00:00
nu_scripts/modules/aws
lywu fb8901e1e8
fix(aws): Fix select-aws-profile script functionality and style (#946)
### What
- Rename main function to 'main' and add --env flag for environment
modification
- Fix region handling to properly check for null values

### Why

The aws/select-aws-profile script syntax is outdated

```shell
➜ nu
Error: nu::parser::named_as_module

  × Can't export command named same as the module.
    ╭─[~/.config/nushell/nu_scripts/modules/aws/select-aws-profile.nu:12:12]
 11 │ #     select-aws-profile
 12 │ export def select-aws-profile [] {
    ·            ─────────┬────────
    ·                     ╰── can't export from module select-aws-profile
 13 │     hide AWS_REGION;
    ╰────
  help: Module select-aws-profile can't export command named the same as the module. Either change the module name, or export `main` command.
```
2024-09-11 06:12:16 -05:00
..
select-aws-profile.nu fix(aws): Fix select-aws-profile script functionality and style (#946) 2024-09-11 06:12:16 -05:00