Skip to content
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

Arguments with spaces in watch command are incorrectly split #70

Open
koterpillar opened this issue Aug 5, 2022 · 2 comments
Open

Arguments with spaces in watch command are incorrectly split #70

koterpillar opened this issue Aug 5, 2022 · 2 comments

Comments

@koterpillar
Copy link

koterpillar commented Aug 5, 2022

This command gives the tabular output with details:

$ bash -c 'ls -l'
total 0
-rw-r--r--. 1 user user 0 Aug  5 17:23 a
-rw-r--r--. 1 user user 0 Aug  5 17:23 b
-rw-r--r--. 1 user user 0 Aug  5 17:23 c

However, Viddy breaks it, and -l is passed to bash, not ls:

viddy bash -c 'ls -l'

viddy output with just file names

This behavior is present in traditional watch, but I don't actually see a reason for it.

@koterpillar
Copy link
Author

Here the arguments are joined together, which causes the incorrect behavior if some arguments already contain spaces:

https://github.com/sachaos/viddy/blob/0ab3347/snapshot.go#L110

@phanirithvij
Copy link

viddy "bash -c 'ls -l'"
watch "bash -c 'ls -l'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants