+
Termux
+
+
+
+
+
Only the termux versions provided along with uweb browser can work seamlessly.
+
Click the following links to install termux configurations:
+
.bashrc
+
.inputrc
+
z.sh
+
commacd.sh
+
Copy existing termux installation to other devices
+
+- target device: install termux app, then run "apt install openssh" inside the termux.
+- source device: Send the "~/.ssh" folder with uweb browser to the network.
+- target device: Uweb to visit "file://data/data/com.termux/files/home/" to reach the folder, then receive the data sent by the above source device.
+- source device: Run "sshd".
+- target device: Run the command "scp -P 8022 -r [source ip]:.. .."
+
+
Tips
+
File system navigation:
+With z.sh and commacd, user can reach any folder with few key stokes. Run "v" to launch uweb file manager on the current working directory, long click any file link to share.
+
+
+
+
+
diff --git a/termux/bashrc b/termux/bashrc
new file mode 100644
index 0000000..a3bf988
--- /dev/null
+++ b/termux/bashrc
@@ -0,0 +1,44 @@
+unset HISTFILE
+if [[ $EUID -ne 0 ]]; then
+ history -r ~/.bash_history
+ else
+ history -r ~/.bash_history.root
+fi
+export HISTCONTROL=ignoreboth:erasedups
+#shopt -s histappend
+
+shopt -s globstar
+
+export _Z_CMD=j
+. z.sh
+. commacd.sh
+
+alias j="_z"
+v(){
+ file=
+ if [ $1 ]; then
+ file=${1}
+ shift
+ fi
+ url="file://${PWD}/${file}"
+ am start -a android.intent.action.VIEW -d "$url" $@
+}
+
+d(){
+ word=$1
+ dict=${2:-ahd}
+ tdict ~/share/dict/$dict $1
+}
+
+z(){
+#usage: z word dictname percent
+ word=$1
+ dict=~/share/dict/$2.xz
+ percent=''
+ if [ "$3" ]; then
+ percent=${3}p
+ fi
+ xz -cdf -- "$dict" | less -n +"${percent}/####$word"
+}
+
+export LESS=-inR
diff --git a/termux/inputrc b/termux/inputrc
new file mode 100644
index 0000000..b1d4ac8
--- /dev/null
+++ b/termux/inputrc
@@ -0,0 +1,12 @@
+set editing-mode vi
+
+$if Bash
+ Space: magic-space
+$endif
+"\e[A": history-search-backward
+"\e[B": history-search-forward
+
+set completion-prefix-display-length 2
+
+Control-j: menu-complete
+Control-k: menu-complete-backward