หากคุณเรียกใช้bashเป็น:
LD_DEBUG=bindings bash
บนระบบ GNU และ grep สำหรับbash.*tinfoผลลัพธ์นั้นคุณจะเห็นสิ่งต่อไปนี้:
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `UP'
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `PC'
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `BC'
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `tgetent'
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `tgetstr'
797: binding file bash [0] to /lib/x86_64-linux-gnu/libtinfo.so.5 [0]: normal symbol `tgetflag'
คุณสามารถยืนยันจากผลลัพธ์ของการnm -D /bin/bashที่bashใช้สัญลักษณ์เหล่านั้นจาก tinfo
การนำหน้า man สำหรับสัญลักษณ์ใด ๆ เหล่านี้จะอธิบายสิ่งที่พวกเขากำลังทำอยู่:
$ man tgetent
NAME
PC, UP, BC, ospeed, tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs -
direct curses interface to the terminfo capability database
โดยทั่วไปbashมีโอกาสมากขึ้นที่ตัวแก้ไขreadline(libreadline จะถูกเชื่อมโยงแบบคงที่ใน) ใช้สิ่งเหล่านั้นเพื่อค้นหาฐานข้อมูล terminfo เพื่อค้นหาความสามารถของเทอร์มินัลเพื่อให้สามารถเรียกใช้ตัวแก้ไขบรรทัดได้อย่างถูกต้อง สถานีปลายทาง
ว่าทำไม ReadLine มีการเชื่อมโยงแบบคงที่เข้ามาbashคุณต้องจำไว้ว่าreadlineมีการพัฒนาควบคู่ไปกับการโดยบุคคลคนเดียวกันและรวมอยู่ในแหล่งที่มาของbashbash
เป็นไปได้ที่จะสร้างbashการเชื่อมโยงกับระบบที่ติดตั้งlibreadlineแต่ถ้าเป็นรุ่นที่เข้ากันได้และนั่นไม่ใช่ค่าเริ่มต้น คุณจำเป็นต้องเรียกใช้สคริปต์ในเวลารวบรวมกับconfigure--with-installed-readline
TERM? โอ้ไม่เคยคิด -ncursesฉันเห็นแพคเกจมาเป็น