Comments (5)
Voilà: https://git.sr.ht/~paulapatience/prmindent.
A few caveats, though. There are no tests yet; I intend to add an organized test suite, but for now I've been testing the script by formatting a configuration file I created specifically for this purpose each time I make changes. Also, the script's hashbang line uses the -Wexec
option of mawk
and gawk
. With goawk
you need to run the script as goawk -f prmindent -- [ARG ...]
. (This is all described in the documentation.) I'm actually going to presently open an issue requesting the -Wexec
option be added to goawk
; it is practical when writing Awk scripts that should look like regular command-line utilities.
from goawk.
Fixed on master. Thanks for the report!
from goawk.
Out of interest @paulapatience, what are you using GoAWK for, or what project are you using it in?
from goawk.
I wrote prmindent(1) — a formatter for configuration files written in the deal.II PRM format that I will be releasing as open source soon — in Awk. I made sure the script runs on as many versions of Awk as possible.
I enjoy using Awk and have kept an eye on GoAWK ever since I learned about it a year or so ago (from one of your posts that I saw on Hacker News), but didn't get a chance to try it out until now. (I recently submitted a patch to the Guix project adding a package for GoAWK, though I now realize I need to modify it because it exposes only the command itself and not the Go package.)
By the way, thank you for the prompt fixes!
from goawk.
@paulapatience Good to hear, thanks! Let me know when you've released prmindent, and I'll add it to my list of programs I can test GoAWK with.
from goawk.
Related Issues (20)
- Ensure we use value of FS at the time the record was read
- Allow outputting to /dev/stderr on Windows HOT 14
- Missing support for json input files HOT 1
- CSV - loss of double quote when dataset is updated HOT 2
- After Go 1.21 is out, build with PGO enabled HOT 1
- close() on pipe command does not return exit status HOT 2
- close() on input pipe does not cleanup child process HOT 5
- system() always returns -1 if process exits due to signal
- fflush() stops on first flush error HOT 2
- Add support for new \u Unicode escape sequence
- Windows error: flag provided but not defined: -encodedCommand HOT 3
- goawk CSV mode ignores specified field separator HOT 2
- Allow line break between `}` and `while` HOT 1
- parser: Discriminate between constant and dynamic regexps HOT 3
- Support for network? HOT 3
- What's the purpose of `testdata/echo` HOT 7
- {} behaves like 1, END{} doesn't exhaust input HOT 2
- Support for %i in format strings. HOT 3
- srand() initialization without an argument. HOT 1
- Test failures on Linux/i386 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goawk.