3.5 Keyboard Tricks

Auto complete

This is standard on all Linux and a great time saver.

cd ~
mkdir verylongandhardtoremberdirectoryname1

Enter cd (change directory) v, then push the arrow key for UP. The last command is shown.Backspace the last character of 1 and replace it with a 2.

cd ~
mkdir verylongandhardtoremberdirectoryname2
cd v[TAB]

Here tab is shown by the arrow keys.

The shell autocompletes the file up to the point where the two files differ.

You can also move the Termux keyboard to the left so you have the standard Android keyboard with auto-complete.

This next step uses what we have learned.

cd /data/data/com.termux/fildes/home mkdir ./.termux

This creates a directory under the home directory.The leading . means it is a hidden directory for configuration files.

nano ./.termux/termux.properties

This opens up a nano editing session. Copy the new section into nano.

extra-keys = [['~','ESC','/','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]

Select CTRL-X to exit, select y when asked to save and comfirm the filename.

cat ~/.termux/termux.properties

will show you the contents of the file.

termux-reload-settings

This final step will set up your Termux to have extra keys for moving left and right.

No comments:

Post a Comment

Introduction to Linux Command Line

SSH is the way you will connect to your Linux server. You will need to understand the basics of the Linux Command Line.