Skip to content

Commit

Permalink
Fix assume-role alias for zsh and bash
Browse files Browse the repository at this point in the history
bash do not allow anonymous functions
  • Loading branch information
qoomon authored Nov 17, 2017
1 parent 612ae3d commit 0ca7e81
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,15 @@ $env:ASSUMED_ROLE="prod"
# assume-role.exe prod | Invoke-Expression
```

If you use `eval $(assume-role)` frequently, you may want to create a bash alias for it:
If you use `eval $(assume-role)` frequently, you may want to create a alias for it:

```bash
alias assume-role='function(){eval $(assume-role $@);}'
* zsh
```shell
alias assume-role='function(){eval $(command assume-role $@);}'
```
* bash
```shell
function assume-role { eval $( $(which assume-role) $@); }
```

## TODO
Expand Down

0 comments on commit 0ca7e81

Please sign in to comment.