2
3
I had to resort to using Termux since the developer of Servers Ultimate Pro has not been updating the Node.js package for a long time and the new ES6 features are breaking my scripts. After browsing instructions, I've got latest Node.js installed through apt-get and I can run my script.
However, I have to type:
$node storage/shared/folder_in_internal_android_memory/app.js
If possible could I make a bash script called "bot.sh" with:
#!bin/bash
node storage/shared/folder_in_internal_android_memory/app.js
Then run with:
$bot
I can cp an already created script but I don't know where to place it to allow me to shortcut it.
I just tested
alias s="node storage/shared/folder_in_internal_android_memory/app.js" and ran
s`. It works but it's not remembered for all sessions. Once I close Termux it forgets the command. Is it possible to set it to permanent remember it for all future sessions? – Nova – 2017-10-06T00:50:23.270Did you just enter the alias, or did you edit the mentioned file and the alias still didn't persist? – anders – 2017-10-06T01:13:18.933
The node file still exist. It just forgets the alias. – Nova – 2017-10-06T01:18:16.660
That was not what I meant. Did you edit: /data/data/com.termux/files/usr/etc/bash.bashrc ? – anders – 2017-10-06T01:18:58.490
Actually, I'm actually following this https://plus.google.com/+KanatTabaldiev/posts/RKavjA1zaCp now but I can't seem to get VIM to exit when I type :x and enter. I presume I just type
– Nova – 2017-10-06T01:22:23.773s="node storage/shared/folder_in_internal_android_memory/app.js
on one line and save.To save and exit vim use :wq . You need to put alias in front of the s or else it will not work. You might have to restart Termux session. – anders – 2017-10-06T01:27:13.417
It's treating the editor as text. It's not working when I enter
:wq<enter key>
. I've tried using Volume Up + E to escape but still locked in VIM. – Nova – 2017-10-06T01:42:34.877Never mind. I've done it. Thanks for your help. I needed to Volume Up + E to trigger ESC since my keyboard doesn't have it and type :wq. – Nova – 2017-10-06T01:46:20.340