Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running code inside a folder that have spaces on its name results in "too many arguments" error (and how to fix it) #67

Open
yosuanicolaus opened this issue Feb 19, 2023 · 2 comments
Labels
invalid This doesn't seem right

Comments

@yosuanicolaus
Copy link

I'm using the default lazy configuration from the README

image

Problem:
The RunCode/RunFile command works well, except for when we are trying to run file inside a directory that has space(s) in its name- for example: "Chapter 03 - If"/ folder.

image

If we rename the directory to not have spaces, it will work as expected

image

I suspect it has something to do with how the "$dir" in filetype from setup returns the string. I found a quick fix by wrapping the $dir with a ' ' (colon) will work as expected.

-- before
cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
-- after
cpp = "cd '$dir' && g++ $fileName -o $fileNameWithoutExt && '$dir/$fileNameWithoutExt'",
@CRAG666
Copy link
Owner

CRAG666 commented Feb 19, 2023

use this
-- after
cpp = "cd '$dir' && g++ $fileName -o $fileNameWithoutExt && '$dir/$fileNameWithoutExt'",

@CRAG666 CRAG666 added the invalid This doesn't seem right label Feb 19, 2023
@Hobbyist11
Copy link

Hobbyist11 commented May 24, 2023

Doesn't work if mode = "toggleterm" is set. Output becomes:
"cd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants