Don't bind in noninteractive mode to prevent from printing warnings:
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 14 Jan 2014 15:13:46 +0200
changeset 686 8c21afb3d2b6
parent 685 c2b825bf0353
child 687 38cec4256537
Don't bind in noninteractive mode to prevent from printing warnings: bind: warning: line editing not enabled when used in "hg push ssh://..."
.bashrc
--- a/.bashrc	Tue Jan 14 15:12:29 2014 +0200
+++ b/.bashrc	Tue Jan 14 15:13:46 2014 +0200
@@ -142,8 +142,10 @@
 
 set -o emacs
 
-bind '"\e/": dabbrev-expand'
-bind '"\ee": edit-and-execute-command'
+if [[ $- == *i* ]]; then
+  bind '"\e/": dabbrev-expand'
+  bind '"\ee": edit-and-execute-command'
+fi
 
 ################################################################
 # Completion.