matejak / argbash

Bash argument parsing code generator
Other
1.4k stars 62 forks source link

Feature Request: Argbash clean command/output type #186

Open nea89o opened 11 months ago

nea89o commented 11 months ago

A command to remove all generated code from a file. This could also just be another output --type. I would love to use this kind of script in combination with gits clean/smudge filters, so i don't have to check changes in the generated code into version control.

nea89o commented 1 month ago

For future reference since i do this quite often now:

# Clean
awk '/needed because of Argbash --> m4_ignore/ {f=1;next} /END OF CODE GENERATED BY Argbash/{f=0;next} !f' $filename

# Smudge
argbash $filename -i