Update .bashrc
[dotfiles/.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index 3c2c9590d84cbceff1da475d8c7f4f26f196ade6..f84374fd7919460299ab9d9eeb02b81e026afa80 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -35,14 +35,6 @@ fi
 
 #########################################AUTOCOMPLETION#####################
 # sources /etc/bash.bashrc).
-if ! shopt -oq posix; then
-  if [ -f /usr/share/bash-completion/bash_completion ]; then
-    . /usr/share/bash-completion/bash_completion
-  elif [ -f /etc/bash_completion ]; then
-    . /etc/bash_completion
-  fi
-fi
-
 if [ -f /usr/share/fzf/completion.bash ];
 then
 source /usr/share/fzf/completion.bash
@@ -55,8 +47,14 @@ fi
 # autocomplete for sudo man and wich
 complete -cf sudo man wich;
 #For arch
-bind 'set show-all-if-ambiguous on';
-bind 'TAB:menu-complete';
+if ! shopt -oq posix; then
+  if [ -f /usr/share/bash-completion/bash_completion ]; then
+    . /usr/share/bash-completion/bash_completion
+  elif [ -f /etc/bash_completion ]; then
+    . /etc/bash_completion
+  fi
+fi
+
 ###########################################################################
 
 ####################################HISTORY MANAGEMENT#####################
@@ -81,3 +79,14 @@ shopt -s checkwinsize
 # vi mode in the shell
 set -o vi
 
+#####adding the agent forwarding stuff
+if [ -z "$SSH_AUTH_SOCK" ] ; then
+    eval `ssh-agent` > /dev/null 2>&1;
+    ssh-add > /dev/null 2>&1;
+
+fi
+
+
+source /usr/share/bash-completion/bash_completion
+bind 'set show-all-if-ambiguous on';
+bind 'TAB:menu-complete';