Hi folks,

This weekend I spent a little time dusting off our vcs tools and
adding bash completion scripts to their respective recipes.

I have been thinking about whether and how to activate the completion
scripts by default without any user interaction (aka 'it just works'),
but decided against it as they should really only be loaded for
interactive bash sessions. If anyone can think of an elegant solution
for this, please chip in.

For the record, /etc/bashrc currently only loads /etc/profile.d/*.sh
scripts when the shell is non-interactive.

For now, you can include the completion scripts in your ~/.bashrc
with, say:

vcs_completions() {
if [ "$PS1" ]; then
 local D
 D=/etc/bash_completion.d
 for vcs in bzr git hg svn; do
   if [ -f "$D"/"$vcs" ]; then
     source "$D"/"$vcs"
   fi
 done
fi
}



 -ermo
_______________________________________________
Foresight-devel mailing list
Foresight-devel@lists.rpath.org
http://lists.rpath.org/mailman/listinfo/foresight-devel

Reply via email to