FVim startup script has trouble with environment variable values with spaces
See original GitHub issueI was not able to start FVim at all, it claimed nvim
was not in the path. I think I tracked this down to the fvim-osx-launcher
file in /Applications/FVim.app/Contents/MacOS
The bash snippet in there can’t deal with spaces in environment variable values, in particular if you have VScode installed, you probably got /Applications/Visual Studio Code.app/Contents/Resources/app/bin
added to your $PATH. But when the launcher script is run your $PATH will get truncated after /Applications/Visual
. If nvim is in a directory after that, FVim will not find it.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Spaces in the shell variables breaks command calling #5136
Vim/Gvim cannot use a shell command if the shell variable includes a space. Different escaping methods methods do not resolve the problem.
Read more >Setting environment vars containing space with env
This works: env -S "`cat .vars`" command. First, in your file, you'll need to quote the variable value. VALUE="This has spaces".
Read more >batch file - How to set environment variables with spaces?
The error output by command setx is caused by wrong usage of the quotes on assigning the string to variable value .
Read more >How do I add environment variables?
To set an environment variable from a script, use the export command in the script, and then source the script. If you execute...
Read more >What are PATH and other environment variables, and how ...
Environment variables hold values related to the current environment, like the Operating System or user sessions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Bash was doing string splitting in the
for
statement based on the default IFS (Internal Field Separator) value, which is usually space, tab, and newline. Resetting it to just a newline helps. This is non-obvious behavior, but has been around in Bash and other Unix-derived shells for a long time. I always have to look it up 😁 .Wow. Thank you for explaining! This is truly non obvious that I read twice and didn’t realize!