rebuilding site Mon Aug 1 08:22:51 PM CST 2022

This commit is contained in:
James Feng Cao 2022-08-01 20:22:51 +08:00
parent 26bfc316fc
commit 47c46dc01a
9 changed files with 167 additions and 7 deletions

44
termux/bashrc Normal file
View file

@ -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

12
termux/inputrc Normal file
View file

@ -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