Closed krzkrzkrz closed 9 years ago
I think I've found the issue (actually two issues) and fixed it. Please give a omf update
and try again.
I did omf update
. I type fish
, in the terminal. I still see the ---DIVIDER---
message
Having:
fenv source ~/.vim/bundle/gruvbox/gruvbox_256palette.sh
fenv source ~/.nvm/nvm.sh\; nvm use 0.12.2
Returns:
contains: Unknown option '-iqE'
~/.local/share/omf/pkg/foreign-env/fenv.parse.diff.fish (line 30): if not contains "$environment" $OLD_ENV
^
in function 'fenv.parse.diff'
called on line 25 of file ~/.local/share/omf/pkg/foreign-env/fenv.main.fish
Please close all fish shells and try again. Also, can you paste me the output of your env
?
Ok, closing all fish shells works. However I get the issue when starting tmux
:
contains: Unknown option '-iqE'
~/.local/share/omf/pkg/foreign-env/fenv.parse.diff.fish (line 30): if not contains "$environment" $OLD_ENV
^
in function 'fenv.parse.diff'
env
:
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.BeAsaT9KcH/Render
COLORFGBG=15;0
GEM_HOME=/Users/chris/.rvm/gems/ruby-2.1.6
GEM_PATH=/Users/chris/.rvm/gems/ruby-2.1.6/Users/chris/.rvm/gems/ruby-2.1.6@global
HOME=/Users/chris
ITERM_PROFILE=foobar
ITERM_SESSION_ID=w0t0p0
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LOGNAME=chris
MANPATH=/Users/chris/.nvm/versions/node/v0.12.2/share/man:/Users/chris/.rvm/rubies/ruby-2.1.6/share/man:/usr/local/share/man:/usr/share/man:/Users/chris/.rvm/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man
NVM_BIN=/Users/chris/.nvm/versions/node/v0.12.2/bin
NVM_DIR=/Users/chris/.nvm
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist
NVM_IOJS_ORG_VERSION_LISTING=https://iojs.org/dist/index.tab
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
NVM_PATH=/Users/chris/.nvm/versions/node/v0.12.2/lib/node
ORIGINAL_PATH=/usr/local/bin/usr/bin/bin/usr/sbin/sbin
PATH=/Users/chris/.nvm/versions/node/v0.12.2/bin:/Users/chris/.rvm/gems/ruby-2.1.6/bin:/Users/chris/.rvm/gems/ruby-2.1.6@global/bin:/Users/chris/.rvm/rubies/ruby-2.1.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/chris/.rvm/bin
PWD=/Users/chris/Sites/foobar/team
RUBY_VERSION=ruby-2.1.6
SHELL=/usr/local/bin/fish
SHLVL=4
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Lph298rxJw/Listeners
TERM=screen-256color
TERM_PROGRAM=iTerm.app
TMPDIR=/var/folders/cd/py8lhjdx4hxcgtd4vpjrnklr0000gn/T/
TMUX=/private/var/folders/cd/py8lhjdx4hxcgtd4vpjrnklr0000gn/T/tmux-501/default,53850,2
TMUX_PANE=%5
USER=chris
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
__fish_bin_dir=/usr/local/Cellar/fish/2.2.0/bin
__fish_datadir=/usr/local/Cellar/fish/2.2.0/share/fish
__fish_help_dir=/usr/local/Cellar/fish/2.2.0/share/doc/fish
__fish_sysconfdir=/usr/local/Cellar/fish/2.2.0/etc/fish
is_vim=echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"
rvm_bin_path=/Users/chris/.rvm/bin
rvm_path=/Users/chris/.rvm
rvm_prefix=/Users/chris
rvm_version=1.26.11latest
The offending line is here:
is_vim=echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"
The problem is that the contents of variable is_vim
contains spaces. This isn't very common, but I have yet to figure out a way to fix it, as fish interprets both newlines and spaces as list dividers.
Can you give another shot with omf update
, closing all shells and reopening @krzkrzkrz ?
Ok that seems to work!
But opening a new fish shell takes around a split second. On bash, much much much faster
I also see, when opening a new fish shell:
Now using node v0.12.2 (npm v2.7.4)
Yes, this is common, as foreign-env does a great amount of string manipulation work. The greater your environment, longer it will take.
By the way, I think that for this specific case using just sh ~/.vim/bundle/gruvbox/gruvbox_256palette.sh
will have the same effect as passing it though fenv
, as this script just does some printf
s remapping colors. fenv
was designed to be used only with applications that use bash export
command, like nvm
and other PATH
manipulation tools.
I'm closing this issue as your reported success in running it. Now fenv
it's protected from messing environment variables badly, something that happened to you. Thanks for your help!! :+1:
No problem! Thanks for that. Wish the startup time could be faster though :)
As requested.
So in
~/.config/omf/init.fish
, I have:Everytime I start a Fish shell, I see:
Is this normal?