Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Please help with strange terminal and vim behavior

Please help with strange terminal and vim behavior
Thread Tools
neilw
Mac Enthusiast
Join Date: Jun 2000
Location: New Jersey, USA
Status: Offline
Reply With Quote
Dec 2, 2005, 09:24 AM
 
Hi,
I'm having some issues with Terminal right now, could use some help.

Recently, I've found that when I open new windows in Terminal, they alternate between giving me a shell prompt and the message

[Process Completed]

When I see that, the window is basically dead and I need to close it and open another one, which will be fine.

Next, in my Terminal preferences, I use zsh as my default shell, and have it set to declare $TERM as xterm-color. However, when I start a shell and echo $TERM, it just gives me xterm.

I do not have "Disable ANSI color" checked in Window Settings, but I still seem to be having trouble getting any color to be displayed, even if I manually set TERM to xterm-color or ansi. This is especially bothersome in vim, which I am trying to use for some code editing.

Any ideas?
     
wgscott
Fresh-Faced Recruit
Join Date: Nov 2005
Status: Offline
Reply With Quote
Dec 3, 2005, 01:31 AM
 
The process completed message is what you get when you exit a shell. So for some reason it seems like the shell is crashing.

Here is what I would do:

1. Move your ~/Library/Preferences/com.apple.Terminal.plist out of the way. Quit and restart Terminal, and see if your problem goes away. (If it does, great).

2. Download iTerm.app (free) and start it up. Do you get the same behavior?

3. Issue chsh -S /bin/bash. Quit and restart the terminal. Does your problem persist in bash? If not, it is likely that something in your zsh files is corrupting it.

4. If you suspect zsh, move all your zsh configuration files out of the way. These can exist in /etc/zshenv, /etc/zshrc, and so forth, as well as ~/.zshrc, ~/.zshenv, ~/.zlogin and so forth. If you move all of those, you should be back to the default zsh configuration.

If you want to re-configure zsh, you might want to try my zsh files, but MOVE YOUR FILES IN /etc out of the way first so the installer doesn't clobber them.
     
neilw  (op)
Mac Enthusiast
Join Date: Jun 2000
Location: New Jersey, USA
Status: Offline
Reply With Quote
Dec 9, 2005, 09:58 AM
 
Thanks for the suggestions.

Resetting Terminal prefs didn't make a difference, and I can't find any connection to the zsh init files either (system seems to have none in place by default, and I tried installing your init files and that didn't make a difference either.) Very strange. It's most annoying because it used to work, and all of a sudden started misbehaving like that.

Problem does not persist in iTerm, however, so I'm going to use that until the other problem is fixed (or maybe I'll continue to use iTerm, dunno.)

Color problems mostly solved by copying my .vimrc file from work, and getting rid of the "TERM=xterm" in my .zsh_profile.
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Dec 9, 2005, 05:59 PM
 
Open Terminal Preferences. Do you have:
1. "Execute the default login shell" selected
2. "Open a saved .term file" NOT selected?

Changing either of these could cause this behavior.
Also, try opening a new window that works normally, then press command-I to open the inspector window, and push the "Use these settings as defaults" button.
     
neilw  (op)
Mac Enthusiast
Join Date: Jun 2000
Location: New Jersey, USA
Status: Offline
Reply With Quote
Dec 9, 2005, 06:42 PM
 
Both options are correctly set. Tried last suggestion with no effect.

Having installed wgscott's config files, I have noticed that after I open the new Terminal window, it actually takes a few seconds before it spits out the "[process completed]" message. This is true regardless of how long I wait after closing the first window.

Further note that even if I restart Terminal after closing the first window, the second window still comes up (after a few seconds) with the "[process completed]" message.
     
wgscott
Fresh-Faced Recruit
Join Date: Nov 2005
Status: Offline
Reply With Quote
Dec 11, 2005, 03:20 PM
 
If you make another account, does it happen with that?
     
neilw  (op)
Mac Enthusiast
Join Date: Jun 2000
Location: New Jersey, USA
Status: Offline
Reply With Quote
Dec 13, 2005, 11:30 PM
 
Happens the same with a new account.

Man this is frustrating, I don't even know where to look for this...
     
wgscott
Fresh-Faced Recruit
Join Date: Nov 2005
Status: Offline
Reply With Quote
Dec 14, 2005, 12:19 PM
 
If you installed those files, you can deactivate them easily.

Change your default shell in Netinfo to bash or tcsh.

sudo mv /etc/zshenv /etc/zshenv-back
sudo mv /etc/zshrc /etc/zshrc-back

Then you can change back to zsh either in netinfo or by issuing

chsh -s /bin/zsh
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:27 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,