Bash Completion

Some of these steps were taken from here: http://justamemo.com/2009/02/09/bash-completion-along-with-svn-and-git-tab-completion/

I used MacPorts to install bash-completion:

sudo port install bash-completion

Save the following http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/bash_completion

to /opt/local/etc/bash_completion.d/svn-completion.sh

Add the following to .bash_profile or .profile as appropriate.

# for bash-completion
if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi
source /opt/local/etc/bash_completion.d/svn-completion.sh
source /opt/local/etc/bash_completion.d/git-completion.sh

Now restart your Terminal.

Bash “Esc .” not pasting last typed command

I recently ran into an issue where a system I was accessing would paste the last command when typing “Esc .”  I know this is a Bash shortcut so I went to investigating

Turns out in /etc/bashrc I found set -o vi which tells the shell to use a vi-style command line editing interface.

Here is the output with no options given for my system:

[dlopez@dlodev ~]$ set -o
allexport       off
braceexpand     on
emacs           on
errexit         off
errtrace       off
functrace       off
hashall         on
histexpand     on
history         on
ignoreeof       off
interactive-comments on
keyword         off
monitor         on
noclobber       off
noexec         off
noglob         off
nolog           off
notify         off
nounset         off
onecmd         off
physical       off
pipefail       off
posix           off
privileged     off
verbose         off
vi             off
xtrace         off

The output of the command above produced vi on for the system not functioning as I expected.