termux-api: Change termux-clipboard-set
Make termux-clipboard-set set the clipboard to the arguments if given, and only take stdin as input if no arguments given. Closes https://github.com/termux/termux-api/issues/8
This commit is contained in:
parent
ee3660535a
commit
9228c43493
@ -1,6 +1,6 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://termux.com/add-ons/api/
|
||||
TERMUX_PKG_DESCRIPTION="Termux API commands"
|
||||
TERMUX_PKG_VERSION=0.9
|
||||
TERMUX_PKG_VERSION=0.10
|
||||
|
||||
termux_step_make_install () {
|
||||
mkdir -p $TERMUX_PREFIX/bin
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
TEXT=`cat -`
|
||||
if [ $# = 0 ]; then
|
||||
TEXT=`cat -`
|
||||
else
|
||||
TEXT="$@"
|
||||
fi
|
||||
|
||||
@TERMUX_API@ Clipboard --es text "$TEXT"
|
||||
|
Loading…
Reference in New Issue
Block a user