Save Time with minicom macros

来源:互联网 发布:靠谱的水乳推荐 知乎 编辑:程序博客网 时间:2024/06/14 16:55
For those using minicom, there's no need to repeatedly type commands again-and-again.

For those not using minicom, see my next mail.

minicom provides macros support (i.e., hotkeys), which helps preventing form constantly typing cumbersome commands.

Simply 1) put an file named .macros under you home directory, then 2) defines your macros.

For example, I have these defines in my .macros
# F1 empty
pu pmac1            ^M

# F2 remove CAK & iPanel configs

pu pmac2            rm /cadata/*.ca /configs/*.dat^M

# F3 quick way to launch dtv with duma

pu pmac3            LD_PRELOAD=libduma.so.0.0.0 DUMA_PROTECT_BELOW=1 DUMA_PROTECT_FREE=1 DUMA_ALLOW_MALLOC_0=1 G_DEBUG=gc-friendly G_SLICE=always-malloc LANG=zh_TW.UTF8 /usr/bin/dtv^M

pu pmac4            killall dtv^M

pu pmac5            portmap && mount -t nfs 192.192.192.76:/home/sam/workspace/DVB2102C/target /tmp^M

pu pmac6            LANG=zh_TW.UTF8 gdb /usr/bin/dtv^M

pu pmac7            cd /mnt/usb/sda1^M

# F8 unlimit coredump

pu pmac8            ulimit -Ss unlimited && ulimit -Sc unlimited^M

pu pmac9            . /usr/local/stapi/modules/load_env.sh^M



But I found there's a bug in minicom 2.4, which reads .macros only at max 11 lines (including comments). I fixed it, the patch and executable are both attached.
0 0
原创粉丝点击