https://github.com/hymkor/single2double
Replace single-quotations in arguments of command line to backslashes and double quotations
https://github.com/hymkor/single2double
Last synced: 24 days ago
JSON representation
Replace single-quotations in arguments of command line to backslashes and double quotations
- Host: GitHub
- URL: https://github.com/hymkor/single2double
- Owner: hymkor
- License: mit
- Created: 2024-06-29T20:11:55.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-06-30T04:32:06.000Z (10 months ago)
- Last Synced: 2025-02-10T15:50:55.359Z (3 months ago)
- Language: Makefile
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pkg.go.dev/github.com/hymkor/single2double)
single2double.exe
=================In CMD.EXE, we have to write one-liner with `\"` for string literals.
```sh
cat issues.json | jq -r ". | map(\"#\"+(.number|tostring)+\" [\"+ .user.login + \"](\"+ .user.html_url + \")\") | join(\"\r\n\")"
```The single2double.exe replaces ' with \" on the command line and executes it.
```sh
cat issues.json | single2double.exe jq -r ". | map('#'+(.number|tostring)+' ['+ .user.login + ']('+ .user.html_url + ')') | join('\r\n')"
```Install
-------Download the binary package from [Releases](https://github.com/hymkor/single2double/releases) and extract the executable.
### via go install
```
go install github.com/hymkor/single2double@latest
```### via scoop-installer
```
scoop install https://raw.githubusercontent.com/hymkor/single2double/master/single2double.json
```or
```
scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install single2double
```