My "man" utility on MacOS Ventura 13.1 seems to be broken. When I try running "man ls" from the command line I get:
/usr/bin/man: eval: line 413: unexpected EOF while looking for matching `''
/usr/bin/man: eval: line 414: syntax error: unexpected end of file
I expected to see the man page for "ls" displayed in the terminal. Any ideas how to fix this (short of editing /usr/bin/man itself)?
Oops...please ignore. I found the issue. I had an old setup for MANPAGER that integrates with the "bat" utility for displaying man pages that was the culprit.
Related
Hi today for unknown reason, if I typed the following command "vim \tab" in bash terminal to hopefully get an auto-completion, I get the following error:
$ vim bash: command substitution: line 22: syntax error near unexpected token `}'
bash: command substitution: line 22: ` }'
This error does not happen if I typed '\tab` at the end of other commands such as 'ls', or even an alias of vim such as 'alias v=vim'.
This error does not happen in another gnome-terminal, either.
Not sure what is causing this (a vim plugin?). Any idea? thanks.
Found the root cause. I created an alias done, and the "done" conflicts with the bash keyword "done". Problem solved by renamed the alias.
I am installing software, and the last line (here is the picture of my terminal 1) delivers the message: -bash: syntax error near unexpected token `(' . I was thinking that I need to insert a backward slash somewhere in between the parentheses in the command line that gave me the error message when I ran it. However, I am skeptical of having to change anything because this line is from NASA from a tutorial to install certain software (seems pretty official). Thank you!
It looks like you're following the instructions at this website:
https://heasarc.gsfc.nasa.gov/lheasoft/install.html
And you've copied this command into your terminal
gunzip -c heasoft6.26(src|arch).tar.gz | tar xf -
The command isn't meant to be copied literally, the writers intend you replace the "(src|arch)" part to match the file you've downloaded.
Check what files exist in your directory by running ls -l
When you see the file you're looking for, run the command again with the correct filename.
For example if you downloaded the pre-compiled binary for OS X, run:
gunzip -c heasoft-6.26.1mac_intel_darwin18_patch.tar.gz | tar xf -
Each time I open my terminal(mac laptop). I get this weird looking error which never goes away. Almost a year now. Please what does it mean?
-bash: command substitution: line 1: syntax error near unexpected token `newline'
-bash: command substitution: line 1: `/usr/libexec/java_home -v <version>'
https://i.stack.imgur.com/4sXcY.png
Although the terminal still works but I don't know what these two lines mean.
I've used virtualenv to program using my mac terminal for about 1/2 a year w/no issues. Suddenly today I began to get relative path errors when I tried to load python. There was no apparent reason for it, and eventually I tried restarting my computer.
Then I opened a new terminal window, and these new errors were present for the first time:
-bash: eval: line 4: unexpected EOF while looking for matching `"'
-bash: eval: line 5: syntax error: unexpected end of file
I assume the two misbehaviors are related in some way. Any idea what would be causing it? What files could the terminal be looking at that would cause this? AFIAK, I haven't changed anything on which it would depend.
Thx for any advice!
My guess is that a bash startup file (~/.bashrc, or possibly /etc/profile, ~/.bash_profile, ~/.bash_login or ~/.profile) contains a syntax error, and that causes all sorts of errors for other programs because the setup of the environment they expect does not take place.
From the error message it seems like an unterminated string constant, i.e. a missing ".
The bash manual on startup files has information about this.
You can also try to start bash in debug mode (bash -x (interactive shell) or bash -lx ( login shell)) to try to identify the error.
My laptop crashed and when it rebooted, "cmd /" (toggle comment) was broken. When I try to toggle comments on a line that only contains "foo", I get this output in my code instead of "# foo":
/tmp/temp_textmate.2erfLj:68:in
/bin/bash: -c: line 0: unexpected EOF
while looking for matching ''
/bin/bash: -c: line 1: syntax error:
unexpected end of filemap' for "
foo":String (NoMethodError) from
/tmp/temp_textmate.2erfLj:48:in
/bin/bash: -c: line 0: unexpected EOF
while looking for matching''
/bin/bash: -c: line 2: syntax error:
unexpected end of file'
This is driving me nuts
Matt Hayes' answer pointed me to the trouble spot.
Bundles -> Bundle Editor -> Edit Commands --> Source --> Comment Line / Selection
change line 139:
- lines = text.to_a
+ lines = text.split(/$/).map(&:chomp)
#to_a is no longer a string method.
http://ruby-doc.org/core-1.9.3/String.html
I ran into the same issue and figured out a workaround. Reinstalling TextMate did not help in my case.
Bundles -> Bundle Editor -> Edit Commands --> Source --> Comment Line / Selection
At the top of the script you should see this:
#!/usr/bin/env ruby
I changed this to use another installation of Ruby. In my case I'm using RVM to manage different Ruby versions, so I have:
#!/Users/_username_/.rvm/rubies/ruby-1.8.7-p334/bin/ruby
So it seems something got screwed up with the default system Ruby.
I had this same problem. Reinstalling TextMate seems to have solved the problem.
This problem appeared after migrating from one Mac to another. I'm not sure if thats the cause though. They where both MacBook Pro's running snow leopard.
If you're using ruby 2.0 or you recently upgraded to Mavericks (system ruby in Mavericks is now 2.0), edit abovementioned command and add "-Ku" to the first line, like so:
#!/usr/bin/env ruby -Ku
Worked for me.