Title: New fish session on iTerm2 get (standard_in) 1: parse error
Tags: fish;iterm2
Question: I recently updated iTerm2 to version 3.2.4 and then to 3.2.5 and I get (standard_in) 1: parse error every time I start a new fish session. (on both versions - nothing on the previous ones).
I use fortune -a -s as greeting, and don't think that is the cause of the error.
My version of fish is 2.7.1
Renaming config.fish file, &quot;solved&quot; the error! I believe the real problem is in init.fish.
My config.fish file :
set -gx OMF_PATH /Users/<my-user&gt;/.local/share/omf
set -gx OMF_CONFIG /Users/<my-user&gt;/.config/omf
source $OMF_PATH/init.fish
set -g fish_prompt_pwd_dir_length 5
My init.fish file was never altered, so the file is still equal to the original one: init.fish
Comment: Insufficient data. But one possibility is you are doing something like `cmd_that_produces_posix_shell_output | source`. Also, if you have iTerm shell integration enabled does disabling that make the problem go away? What if you temporarily rename your *~/.config/fish* dir?

Comment: I think it more likely the problem is with an OMF plugin, not the OMF code itself. Can you disable each plugin one at a time to pinpoint which one is the cause of the error?

Comment: I'm voting to close this question as off-topic because the question has been answered in comments.

Comment: @KurtisRader I do not have shell integration. I have updated my question with what you suggested. Thank you in advance!

Comment: @KurtisRader you were wright! It was a package named ***battery*** that was causing that. I uninstalled it because I don't use it. Problem solved! Thank you!


Here is another answer: I had a similar issue although it didn't affect me from starting a fish shell. However, I believe the similar outcome was related. When I added quotes in certain spots, and used brackets to separate a variable to be expanded before appending the rest of a string to it that seemed to work. In your case try editing config.fish like so:
set -gx OMF_PATH "/Users/anonirato/.local/share/omf"
set -gx OMF_CONFIG "/Users/anonirato/.config/omf"
source "{$OMF_PATH}/init.fish"
set -g fish_prompt_pwd_dir_length 5
Let me know if that does anything for ya. If not, then I will dig deeper and edit my answer.
Comment for this answer: as I said in the comments of question, replying to Kurtis Rader, what was causing the problem was a fish package named ***battery***. I removed it and never tried installing again as I didn't use it. Maybe your answer could solve the problem without having to uninstall it.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 5, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:10/31/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<fish><iterm2>', 'Title': 'New fish session on iTerm2 get (standard_in) 1: parse error', 'ViewCount': 192, 'id': 53074554, 'user_AboutMe': '', 'user_AccountId': 11934987.0, 'user_DisplayName': 'zediogoviana', 'user_Reputation': 285.0, 'user_Views': 39.0, 'user_id': 8733796.0}}