jetmore / swaks

Swaks - Swiss Army Knife for SMTP
http://jetmore.org/john/code/swaks/
GNU General Public License v2.0
848 stars 86 forks source link

sigil to indicate reading contents from a process #35

Open jetmore opened 3 years ago

jetmore commented 3 years ago

options like --data are moving toward requiring a sigil to indicate that their contents need to be pulled from a file. We could expand this to a new sigil to indicate that the argument is a program to execute, the output of which should be used as the real content. This idea came from a user thinking that's what --pipe did. This is mostly unnecessary as backticks would usually do the same thing, but it would be nice to have the functionality on windows

Example:


--body "some contents"
  uses "some contents"

--body @file.txt
  uses contents of file.txt

--body :"tail -1 file.txt"
  uses the output of "tail -1 file.txt"