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

Using backtick #70

Open
jonnieey opened this issue Oct 24, 2021 · 6 comments · May be fixed by #72
Open

Using backtick #70

jonnieey opened this issue Oct 24, 2021 · 6 comments · May be fixed by #72

Comments

@jonnieey
Copy link

Is it possible to use shell backtick to expand variables eg. vim `which COMMAND

@Aloso
Copy link
Contributor

Aloso commented Oct 24, 2021

No. Parameters are expanded by default if they are known variables:

vim os@name
# opens a file called "manjaro"

It should also work for programs:

vim (which COMMAND)

But that is currently broken. I'll open an issue.

@jonnieey
Copy link
Author

Okay, thanks.

@Aloso Aloso linked a pull request Oct 27, 2021 that will close this issue
@jonnieey
Copy link
Author

jonnieey commented Nov 1, 2021

Now it stores variable as expected but still cannot work on them
eg
let x = which mywork
echo x # /path/to/mywork
vim x # doesn't open the /path/to/mywork
vim (x) # doesn't open /path/to/mywork
vim (which mywork) # doesn't work

I pulled from your repo Aloso/dune branch pipe-stdout

@Aloso
Copy link
Contributor

Aloso commented Nov 1, 2021

I think the issue is that which adds a line break after the path.

@jonnieey
Copy link
Author

jonnieey commented Nov 1, 2021 via email

@jonnieey
Copy link
Author

jonnieey commented Nov 1, 2021

I even tried
vim (print (which mywork))

which removes the newline but it doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants