Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thrawn01/rewrite-args

Small tool to rewrite arguments before calling an executable
https://github.com/thrawn01/rewrite-args

args cli hostname regexp ssh

Last synced: 5 days ago
JSON representation

Small tool to rewrite arguments before calling an executable

Awesome Lists containing this project

README

        

## Synopsis

#### If the following is true
```
alias ssh='rewrite-args ssh -X'
```

#### and ~/.rewrite-args.conf contains
```json
{
"debug": false,
"rewrites": [
{
"match": ".use1",
"replace": ".prod.us-east-1.postgun.com"
}
]
}
```

#### Given the following command
```
ssh worker-n01.use1
```

#### Will expand too
```
/usr/bin/ssh -X worker-n01.prod.us-east-1.postgun.com
```

## Installation

Download the latest binary [release](https://github.com/thrawn01/rewrite-args/releases)

**OR**

`go install github.com/thrawn01/rewrite-args`