:open command with %sh{} to open multiple files #13208
Unanswered
Direwolfesp
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Problem
im trying to open multiple filepaths that are contained in a txt file with:
:o %sh{paste -sd ' ' /tmp/unique-file}
which will output a string with space separated paths like: "/path/file1.txt /path/file2.txt /path/fileN.txt".However, it just tries to open it as a single string, instead of spliting by spaces to open all the files.
Additionally
Im using nushell and I tried multiple ways to do it. If I type in the shell
hx ...(open /tmp/unique-file | lines)
, It will work as each path will be its own string, however i couldn't replicate it while inside helix with:o %sh{open /tmp/unique-file | lines | str join (char space) }
as it will be treated as a single string.Is there a way I could get around this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions