awslabs / awslabs/awscli-aliases
Cannot use options for echo command
- Dominant language
- No language data
- Stars
- 485
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
When I used `echo` command in alias function, `-n` option is not used by `echo` as follows:
```
foo =
!f() {
echo -n 1
}; f
```
```
$ aws foo
-n 1
```
But, `ls` command can use options successfully:
```
bar =
!f() {
ls
}; f
baz =
!f() {
ls -l
}; f
```
```
$ aws bar
file1 file2
$ aws baz
total 0
-rw-r--r-- 1 aibou staff 0 3 16 15:20 file1
-rw-r--r-- 1 aibou staff 0 3 16 15:20 file2
```
It seems a bug but I can't understand why ONLY `echo` behave it...
Contributor guide
Research direction
Reproduce the `aws foo` alias from the issue and compare it with `aws bar` and `aws baz`; then trace how the alias function is invoked and how `echo -n 1` is passed. Done means the `foo` alias honors `-n` while the existing `ls` behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100