We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f32160 commit a058ac4Copy full SHA for a058ac4
1 file changed
halium-chroot
@@ -37,13 +37,17 @@ umount_all()
37
mount_all > /dev/null
38
39
CHROOT='TERM=linux HOME=/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH chroot /target'
40
+LINES=$(tput lines)
41
+COLUMNS=$(tput cols)
42
43
if [ $# -eq 0 ]
44
then # Interactive shell
45
if [ $(which tmux) ]
46
then # with tmux installed
47
tmux new-session -s halium-adb -d 'adb shell'
48
sleep 1
49
+ let LINES-=1
50
+ tmux send-keys -t halium-adb "export LINES=${LINES}; export COLUMNS=${COLUMNS}"$'\n'
51
tmux send-keys -t halium-adb "${CHROOT} /bin/bash; exit"$'\n'
52
tmux attach -t halium-adb
53
else # without tmux installed
0 commit comments