From 7bbc077990fd83116451e69a6b38843bc5d6fa54 Mon Sep 17 00:00:00 2001 From: Eddie Hurtig Date: Fri, 5 Jun 2015 17:56:05 -0400 Subject: [PATCH] Check for PTY before attempting to use bind After running a dist upgrade on one of my Ubuntu 14.04 test workstations I started receiving errors after a graphical login. This should also fix remote ssh login problems as seen in http://superuser.com/questions/892658/remote-ssh-commands-bash-bind-warning-line-editing-not-enabled --- plugins/available/history.plugin.bash | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/available/history.plugin.bash b/plugins/available/history.plugin.bash index 512bbf92..386e05d1 100644 --- a/plugins/available/history.plugin.bash +++ b/plugins/available/history.plugin.bash @@ -1,4 +1,7 @@ # enter a few characters and press UpArrow/DownArrow # to search backwards/forwards through the history -bind '"":history-search-backward' -bind '"":history-search-forward' +if [ -t 1 ]; +then + bind '"":history-search-backward' + bind '"":history-search-forward' +fi