[Bug 15146] New: xargs: Allow running interactive commands with -o [PATCH]
bugzilla at busybox.net
bugzilla at busybox.net
Sat Nov 26 17:59:57 UTC 2022
https://bugs.busybox.net/show_bug.cgi?id=15146
Bug ID: 15146
Summary: xargs: Allow running interactive commands with -o
[PATCH]
Product: Busybox
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: malloryadams at fastmail.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Created attachment 9416
--> https://bugs.busybox.net/attachment.cgi?id=9416&action=edit
Patch to add -o support
https://github.com/MalloryA/busybox/commit/2b66ae249d87c3b1c427cc87862ad6612b27c271
-o opens /dev/tty and connects it to the stdin of the commands that get
executed.
Example: say we want to delete some files interactively. We cannot do
that with xargs without the -o option because the `rm -i` command does
not receive an interactive stdin. But if we add `-o`, then xargs will
ensure that /dev/tty is connected as stdin and `rm -i` will show us a
prompt and wait:
```
% touch a b c
% echo a b c | xargs -o rm -i
```
The -o option is available in GNU and FreeBSD versions of xargs as non-POSIX
extensions.
Attached is a patch generated by `git format-patch`. I put the same patch on
GitHub too:
https://github.com/MalloryA/busybox/commit/2b66ae249d87c3b1c427cc87862ad6612b27c271
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list