You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: tmignore list is hard for other programs to parse. It would be awesome if tmignore list -0 would print just an ASCII NUL-separated list.
When I run tmignore list I get:
119 files/directories have been excluded from backups by tmignore:
- /Users/nop/gh/project1/DerivedData/
- /Users/nop/gh/project1/project1.xcodeproj/project.xcworkspace/xcuserdata/
[...]
I wanted to see how much space I was saving.
$ tmignore list | awk '/ - \// {print $3}'| xargs du -hsc
du: /Users/nop/gh/project1/DerivedData/\033[0;39m: No such file or directory
du: /Users/nop/gh/project1/project1.xcodeproj/project.xcworkspace/xcuserdata/[0;39m: No such file or directory
[...]
tmignore is emitting some kind of ANSI terminal code at the end of each line. That's rude if stdout isn't a terminal.
A more-working awk one-liner is:
$ tmignore list | awk -F$"( |\033)"'/ - \// {print $5}'| xargs du -hsc
Ideally, tmignore list -0 (or some other command) would produce a list of files separated by ASCII NUL characters, '\0'. The find, grep, and xargs commands support NUL-separated lists of files. (I really wish POSIX would prohibit filenames with newlines in them; as it is, only / and \0 are the only characters prohibited in filenames.)
The text was updated successfully, but these errors were encountered:
Summary:
tmignore list
is hard for other programs to parse. It would be awesome iftmignore list -0
would print just an ASCII NUL-separated list.When I run
tmignore list
I get:I wanted to see how much space I was saving.
tmignore is emitting some kind of ANSI terminal code at the end of each line. That's rude if stdout isn't a terminal.
A more-working awk one-liner is:
Ideally,
tmignore list -0
(or some other command) would produce a list of files separated by ASCII NUL characters,'\0'
. Thefind
,grep
, andxargs
commands support NUL-separated lists of files. (I really wish POSIX would prohibit filenames with newlines in them; as it is, only/
and\0
are the only characters prohibited in filenames.)The text was updated successfully, but these errors were encountered: