[Feature]: Add exec command args for xlinectl watch command
Closed this issue · 3 comments
Description about the feature
The etcdctl provides the exec-command arg for the watch command. Therefore, when you want to execute some commands after triggered by watch command, you can use one-line command, like ./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_"
. I think this way is more user-friendly.
So far, the xlinectl doesn't support the exec command args for the watch command. I think it's not hard to implement. I leave an issue here to track. Please feel free to take this issue if you are interested in it. And please let me know if you need any help or more information.
Code of Conduct
- I agree to follow this project's Code of Conduct
👋 Thanks for opening this issue!
Reply with the following command on its own line to get help or engage:
/contributing-agreement
: to print Contributing Agreements./assignme
: to assign this issue to you.
Hey, i don't understand your issue , can you explain what problem are you facing?
Hi, @panwarharsh15 ! Here is an etcdctl watch command example:
./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_"
# PUT
# foo
# bar
# ETCD_WATCH_REVISION=11
# ETCD_WATCH_KEY="foo"
# ETCD_WATCH_EVENT_TYPE="PUT"
# ETCD_WATCH_VALUE="bar"
We can split this command ./etcdctl watch foo -- sh -c "env | grep ETCD_WATCH_"
by -- into two parts: one is ./etcdctl watch foo
, and the other part is a shell command: env | grep ETCD_WATCH_"
. It indicates that execute the watch command ./etcdctl watch foo
and perform the shell command env | grep ETCD_WATCH_
when the watch command is triggered.
And currently, the watch sub-command in xlinectl
doesn't support this way. We can only perform xlinectl watch foo
without -- sh -c "env | grep ETCD_WATCH_"
.