-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make homeshick output machine readable #70
Comments
I like this idea - I have noticed the output gets a bit mangled in the bats unit tests as well. So, you just want a raw stream of files + action taken by homeshick streamed to stdout if
Does it make sense to change the separator between action and the file? Maybe we could use a comma or a tab instead of a space so you can |
Agreed to everything. I'd go for the tab. Or instead maybe just remove the spaces in the left column? |
I am not sure how removing spaces in the left column would work. How would the program interpreting the output know where to put them back so they could do something useful with the filename? |
You'd just separate by the first space, so |
Oh of course! I thought by 'left" column you meant the "right" column with the file name 😞. All things considered, I agree using |
Currently homeshick outputs text that is very readable by a human when viewed through a terminal. However, when read by or though anything else it becomes quite a challenge because carriage returns (
\r
) and coloring have to be taken into account.homeshick should check whether STDOUT is the terminal and only then output data optimized for human viewing. This can easily be checked with
[ -t 1]
.This enhancement also makes unittests easier and allows for homeshick to be integrated with other code.
The text was updated successfully, but these errors were encountered: