1

Im getting a

-bash: complete: bashdefault: invalid option name

when I fire up my terminal. Any ideas as to what I messed up and where?

running bash -x

+ '[' -n '\s-\v\$ ' ']'
+ PS1=\h:\w \u\$ 
+ shopt -s checkwinsize

and 'bash -lx'

+ bash -lx
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin
+ export PATH
+ '[' /bin/bash '!=' no ']'
+ '[' -r /etc/bashrc ']'
+ . /etc/bashrc
++ '[' -n '\s-\v\$ ' ']'
++ PS1=\h:\w \u\$ 
++ shopt -s checkwinsize
+ export PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
+ PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
+ export DISPLAY=:0
+ DISPLAY=:0
+ [[ -s /Users/ed/.rvm/scripts/rvm ]]
+ source /Users/ed/.rvm/scripts/rvm
++ grep -q '^rvm ()'
+++ declare -f
++ [[ 1 -gt 0 ]]
++ [[ 0 -eq 0 ]]
++ [[ -f /etc/rvmrc ]]
++ [[ -f /Users/ed/.rvmrc ]]
++ [[ -z 1 ]]
++ [[ -z '' ]]
++ [[ 1 = \0 ]]
++ rvm_prefix=/Users/ed/.
++ echo /Users/ed/.
++ grep -vq '\(\/\|\.\)$'
++ rvm_prefix_needs_trailing_slash=1
++ [[ /Users/ed/. = \/\u\s\r\/\l\o\c\a\l ]]
++ [[ 1 = \0 ]]
++ [[ -z /Users/ed/.rvm ]]
++ [[ -d /Users/ed/.rvm ]]
++ [[ -f /Users/ed/.rvm/scripts/array ]]
++ source /Users/ed/.rvm/scripts/array
+++ [[ -n '' ]]
+++ __array_start=0
++ [[ -f /Users/ed/.rvm/scripts/utility ]]
++ source /Users/ed/.rvm/scripts/utility
++ [[ -f /Users/ed/.rvm/scripts/initialize ]]
++ source /Users/ed/.rvm/scripts/initialize
+++ [[ -n '' ]]
+++ [[ -n 2.05b.0(1)-release ]]
+++ shopt -s extglob
+++ [[ 1 -eq 0 ]]
+++ rvm_bin_path=/Users/ed/.rvm/bin
+++ rvm_man_path=/Users/ed/.rvm/man
+++ rvm_rc_files=/Users/ed/.bash_profile /Users/ed/.bashrc /Users/ed/.zshenv
+++ [[ -n '' ]]
+++ rvm_gems_cache_path=/Users/ed/.rvm/gems/cache
+++ export rvm_path rvm_bin_path rvm_gems_cache_path rvm_gemset_separator rvm_selfcontained
++ [[ -f /Users/ed/.rvm/scripts/version ]]
++ source /Users/ed/.rvm/scripts/version
++ [[ -f /Users/ed/.rvm/scripts/selector ]]
++ source /Users/ed/.rvm/scripts/selector
++ [[ -f /Users/ed/.rvm/scripts/cli ]]
++ source /Users/ed/.rvm/scripts/cli
++ [[ -f /Users/ed/.rvm/scripts/cd ]]
++ source /Users/ed/.rvm/scripts/cd
+++ [[ 1 -ne 0 ]]
+++ [[ -n '' ]]
+++ complete -o bashdefault -o default -o filenames -o dirnames -o nospace -F _rvm_cd_complete cd
bash: complete: bashdefault: invalid option name
++ [[ -f /Users/ed/.rvm/scripts/override_gem ]]
++ source /Users/ed/.rvm/scripts/override_gem
+++ [[ 0 -eq 0 ]]
+++ awk '/:/{printf $NF"."}' /Users/ed/.rvm/lib/VERSION.yml
++ rvm_version=1.0.21.
++ export rvm_version=1.0.21
++ rvm_version=1.0.21
++ alias 'rvm-restart=source '\''/Users/ed/.rvm/scripts/rvm'\'''
++ command -v ruby
++ command -v ruby
++ grep -v rvm
++ [[ -s /Users/ed/.rvm/environments/default ]]
++ source /Users/ed/.rvm/environments/default
+++ export PATH=/Users/ed/.rvm/gems/ruby-1.8.7-p302/bin:/Users/ed/.rvm/gems/ruby-1.8.7-p302@global/bin:/Users/ed/.rvm/rubies/ruby-1.8.7-p302/bin:/Users/ed/.rvm/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
+++ PATH=/Users/ed/.rvm/gems/ruby-1.8.7-p302/bin:/Users/ed/.rvm/gems/ruby-1.8.7-p302@global/bin:/Users/ed/.rvm/rubies/ruby-1.8.7-p302/bin:/Users/ed/.rvm/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
+++ rvm_path=/Users/ed/.rvm
+++ export rvm_path
+++ RUBY_VERSION=ruby-1.8.7-p302
+++ export RUBY_VERSION
+++ GEM_HOME=/Users/ed/.rvm/gems/ruby-1.8.7-p302
+++ export GEM_HOME
+++ GEM_PATH=/Users/ed/.rvm/gems/ruby-1.8.7-p302:/Users/ed/.rvm/gems/ruby-1.8.7-p302@global
+++ export GEM_PATH
+++ BUNDLE_PATH=/Users/ed/.rvm/gems/ruby-1.8.7-p302
+++ export BUNDLE_PATH
+++ MY_RUBY_HOME=/Users/ed/.rvm/rubies/ruby-1.8.7-p302
+++ export MY_RUBY_HOME
+++ IRBRC=/Users/ed/.rvm/rubies/ruby-1.8.7-p302/.irbrc
+++ export IRBRC
+++ rvm_ruby_string=ruby-1.8.7-p302
+++ export rvm_ruby_string
+++ unset rvm_gemset_name
+++ unset MAGLEV_HOME
++ __rvm_conditionally_add_bin_path
++ grep -vqF '/Users/ed/.rvm/bin '
++ printf '/Users/ed/.rvm/gems/ruby-1.8.7-p302/bin /Users/ed/.rvm/gems/ruby-1.8.7-p302@global/bin /Users/ed/.rvm/rubies/ruby-1.8.7-p302/bin /Users/ed/.rvm/bin /opt/local/bin /opt/local/sbin /bin /sbin /usr/bin /usr/sbin'
++ return 0
++ unset rvm_prefix_needs_trailing_slash rvm_bin_path rvm_man_path rvm_rc_files rvm_gems_path rvm_gems_cache_path rvm_interactive_flag rvm_gems_path rvm_project_rvmrc_default rvm_gemset_separator
++ [[ 0 -gt 0 ]]
4
  • Did you modify /etc/bash_completion or something in /etc/bash_completion.d? Nov 28, 2010 at 3:30
  • i don't seem to have a /etc/bash_completion or /etc/bash_completion.d
    – errm
    Nov 28, 2010 at 9:57
  • Run bash -x to see a trace of what commands it runs when it starts up. If the error is in the login scripts rather than in the bash setup (it shouldn't be, but evidently your configuration is messed up somewhere), run bash -lx to see it. If you don't find what is wrong from the transcript, copy-paste the transcript into your question. Nov 28, 2010 at 14:28
  • i used his line verbatim in my own shell and it worked. so i'm wondering if bashdefault is an identifier provided by bash-completion? Nov 30, 2010 at 3:01

1 Answer 1

1

Your problem seems to be at the line

+++ complete -o bashdefault -o default -o filenames -o dirnames -o nospace -F _rvm_cd_complete cd
bash: complete: bashdefault: invalid option name

Try to find that complete … line in one of your startup scripts. (Look for files in your home directory named .bash_profile, .bash_login, .profile or .bashrc.) If you require that line, you’ll have to figure out why it’s throwing that “invalid option name” error. I think complete is a bash builtin command, so you should check the bash man page by running man bash.

Of course, if you have no idea why it’s there, you’re probably better off commenting it out by prefacing it with a # symbol.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .