Add parameter to local/remote shell runner to change delimiter in named parameters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
While assisting some users today, I ran into a problem with optparse. In a nutshell, parsing options is hard in Bash, so there are many tendencies to shortcut. One such example:
while [ -n "$1" ]; do
case $1 in
-C|--gecos) gecos=$2; shift 2;;
-e|--email) email=$2; shift 2;;
-u|--userid) userid=$2; shift 2;;
-d|--dry-run) dryrun=1; shift;;
-h|--help) usage;;
*) shift;;
esac
done
Today, I can change the kwargs_op to any prefix I so desire. But, in all cases, the input is distilled to a dict, and then rendered as key-value pairs. (e.g.: --email=james@fryman.io). This causes a failure with the above logic.
This is not an uncommon pattern, and it would be good to be able to s/=/ / in the above parameter.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names kwargs_op and the local/remote shell runner; start by locating where named parameters are converted from a dict into rendered key-value arguments. Check how the current equals delimiter is applied and make the delimiter configurable, including space-separated arguments for Bash case patterns. Confirm that existing equals-separated behavior still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, python
- Domain
- backend, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100