Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to install F# compiler and interactive on my Mac, and part of the installation process required providing aliases in the bash profile file.

I suspect that I messed something up here, because now the terminal doesn't work at all, it only shows:

Last login: Fri May 18 09:44:33 on console
-bash: exit: with: numeric argument required

[Process completed]

and here is the content of the .bash_profile file:

alias fsc="mono ~/FSharp-"
alias fsi="mono ~/FSharp-"

and I am unable to type etc. in the terminal I also tried to start iTerminal, but it just crashes.

Any ideas on how I can get it to work again? I don't usually use the terminal.

share|improve this question
up vote 0 down vote accepted

Open your ~/.bash_profile with a text editor and edit out the section that gives you the error.

If you don't know where the error is, either paste the contents here or try removing your additions line by line, save the file and start a test terminal to see where it starts failing.

share|improve this answer
where can I find the ~/.bash_profile file? thanks! – Sebastian May 18 '12 at 15:31
@Sebastian: ~ means your home folder, so it is there, called .bash_profile. Files beginning with a dot are usually hidden, though, but if you can enter the path to the file directly somewhere or simply choose to view hidden files, you should be able to edit it. – Daniel Andersson May 18 '12 at 15:46
Okay, found it: this is the content of the .bash_profile file: 'alias fsc="mono ~/FSharp-" alias fsi="mono ~/FSharp-"' – Sebastian May 18 '12 at 15:54
Actually, I removed an exit statement that "somehow" had been added at the end when I was editing it in Vim, and now the terminal works, and likewise iTerminal works!! Thanks for moving me in the right direction! With that said, does the bash_profile file look ok otherwise, or are there things missing? – Sebastian May 18 '12 at 16:02
PS: I used "show hide invisible files 1.6" script and it allowed me to view hidden files without using the terminal. – Sebastian May 18 '12 at 16:07

You must log in to answer this question.

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