तुम भी स्वत: पूर्ण आदेश इतिहास के आधार पर कर सकते हैं। टाइप करना शुरू करें, तो कुंजी जो ed-search-prev-history
और ed-search-next-history
लिए बाध्य कर रहे आह्वान। यह लागू होता है अगर mysql libedit समर्थन के साथ आता है। डिफ़ॉल्ट कीबाइंडिंग Ctrl-पी और Ctrl-एन हैं, लेकिन इस .editrc में अनुकूलित किया जा सकता। Ctrl-अप और Ctrl-डाउन के लिए मेरे उदाहरण:
# start typing, then press Ctrl-Up
bind "\e[1;5A" ed-search-prev-history
# start typing, then press Ctrl-Up, then Ctrl-Down
bind "\e[1;5B" ed-search-next-history
इससे पहले, mysql ReadLine के आधार पर किया गया था, और उसके बाद history-search-backward
और history-search-forward
सही आदेशों हैं। विन्यास तो .inputrc के माध्यम से किया गया था। एक ही उदाहरण के रूप में ऊपर:
# these are the key bindings for the readline library
# start typing, then press Ctrl-Up
"\e[1;5A": history-search-backward
# start typing, then press Ctrl-Up, then Ctrl-Down
"\e[1;5B": history-search-forward
तो, कहते हैं कि तुम sel
टाइप करना शुरू किया और Ctrl-अप, select * from some_long_table_name
आह्वान आने कि अगर एक कमांड मैंने पहले का इस्तेमाल किया है है।
Mycli, https://github.com/dbcli/mycli – CodyChan