Sto usando bash 4.3.11 (1) e ho installato il seguente plugin di cronologia (tramite .bash_it ):
# enter a few characters and press UpArrow/DownArrow
# to search backwards/forwards through the history
bind '"^[[A":history-search-backward'
bind '"^[[B":history-search-forward'
Quando accedo a una sessione interattiva va tutto bene, ma quando eseguo comandi remoti tramite, ssh host 'ls -als'ad esempio, vedo il seguente output:
: ssh host 'ls -als'
/home/ubuntu/.bash_it/plugins/enabled/history.plugin.bash: line 3: bind: warning: line editing not enabled
/home/ubuntu/.bash_it/plugins/enabled/history.plugin.bash: line 4: bind: warning: line editing not enabled
Quando modifico il plug-in della cronologia con echo -e '\0033\0143'dopo ogni chiamata di bind non ricevo più gli avvisi ma la mia console viene cancellata. Non è un grosso svantaggio, ma sarebbe bello conoscere un modo più pulito di sopprimerlo per i comandi remoti.
# Works, but annoyingly clears console
# enter a few characters and press UpArrow/DownArrow
# to search backwards/forwards through the history
bind '"^[[A":history-search-backward'
echo -e '\0033\0143'
bind '"^[[B":history-search-forward'
echo -e '\0033\0143'