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

Various commands cut off after the first word. (termux-clipboard-set, termux-notification, termux-dialog) #18

Closed
Neo-Oli opened this issue Apr 18, 2016 · 6 comments

Comments

@Neo-Oli
Copy link
Member

Neo-Oli commented Apr 18, 2016

Hi. I've noticed this today:

$ echo "Hello World" | termux-clipboard-set
$ termux-clipboard-get
Hello
$ termux-clipboard-set "Foo Bar"
$ termux-clipboard-get
Foo
@JKathmann
Copy link

Hi. I've noticed a similar problem today:

$ termux-notification -t "Foo Bar" -c "Hello World"
-> Foo

$ termux-notification -c "Hello World" -t "Foo Bar"
-> Hello

@Neo-Oli
Copy link
Member Author

Neo-Oli commented Apr 19, 2016

Ah yes, I did some more testing. termux-dialog is also affected.
termux-dialog -t "Hello World"
-> Hello

@ghost
Copy link

ghost commented Apr 19, 2016

Can corroborate this from go-termux; Calling termux.Notification("Foo bar", "", "", "") yields a notification entitled "Foo"

@Neo-Oli Neo-Oli changed the title termux-clipboard-set only puts the first word into the clipboard Various commands cut off after the first word. (termux-clipboard-set, termux-notification, termux-dialog) Apr 19, 2016
@ghost
Copy link

ghost commented Apr 19, 2016

Can also confirm this for termux.ClipboardSet.

@JKathmann
Copy link

After some investigation, i found that fornwall has changed the file termux-packages/packages/termux-api/termux-api.c .
New is the call /data/data/com.termux/files/usr/bin/am instead /system/bin/am .
In the file /data/data/com.termux/files/usr/bin/am the quotes around the parameter $@ are missing.
After changing from $@ to "$@" commands run as usual.

@fornwall
Copy link
Member

Thanks, this should now be fixed in the latest termux-tools package which is available through an apt update && apt upgrade.

The termux-clipboard-set command has been modified to either send all arguments, as in termux-clipboard-set hello clipboard world, or if no arguments are given the input is read from stdin for easier piping as in cat myfile | termux-clipboard-set.

The termux-sms-send command has likewise been updated to either take text through arguments or from stdin.

agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
Grimler91 pushed a commit to termux/termux-tools that referenced this issue Aug 2, 2022
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

3 participants