Note that there are some explanatory texts on larger screens.

plurals
  1. PONew tab in Terminal.app does not open in same directory/bash fails (Mountain Lion)
    primarykey
    data
    text
    <p>Basic problem: When I open a new tab in terminal, bash fails with the following error output:</p> <pre><code>bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `exec -la (null) (null) -1' [Process completed] </code></pre> <p>In preferences, I have new tabs set to open with same settings/directory. </p> <p>I've been messing around learning to customize the bash prompt area, actually in an attempt to fix this problem, but to no avail. I messed around with /etc/bashrc before I realized I should do that by user, I've reset that file to look like this:</p> <pre><code># System-wide .bashrc file for interactive bash(1) shells. if [ -z "$PS1" ]; then return fi PS1='\h:\W \u\$ ' # Make bash check its window size after a process completes shopt -s checkwinsize # Tell the terminal about the working directory at each prompt. if [ "$TERM_PROGRAM" == "Apple_Terminal" ] &amp;&amp; [ -z "$INSIDE_EMACS" ]; then update_terminal_cwd() { # Identify the directory using a "file:" scheme URL, # including the host name to disambiguate local vs. # remote connections. Percent-escape spaces. local SEARCH=' ' local REPLACE='%20' local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}" printf '\e]7;%s\a' "$PWD_URL" } PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND" fi </code></pre> <p>Finally, my ~/.bash_profile looks like this:</p> <pre><code>source /etc/bashrc export PATH=~/Code:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin. export CLASSPATH=~/Programs/:~/Programs/bailey.jar:~/Programs/labs/:. export PYTHONPATH=~/dm/:~/Code/Git/.:. </code></pre> <p>If anyone can give me any suggestions, that would be wonderful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload