aws / aws/aws-cli

Allow to specify shell for bash scripting

Open
#7,920 2 comments 0 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the feature

Currently bash scripting aliases use `/bin/sh` to execute the code. Unfortunately, on different systems it's different shells. E.g. it's bash v3 on Macos, and dash on Ubuntu/PopOs. It hinders creating portable aliases.

### Use Case

I share my dotfiles among the devices I use, and it's really hard to write scripts that could be executed on all the systems. E.g. dash does not support arrays so I have to write cumbersome code to emulate it. With the ability to specify the shell I'd write the scripts only for this particular shell.

### Proposed Solution

Allow to specify shell for aliases and pass it as `shell` parameter here: https://github.com/aws/aws-cli/blob/85d72cd19e556ac41f3f7a4fe2eb5527a4bbb029/awscli/alias.py#L283

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CLI version used

2.11.12

### Environment details (OS name and version, etc.)

*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.