2

I have two string variables:

let url = "https://URL/path/to/repo"
let branch = "GIT-HASH"

I want to concatentate them and echo it on the shell:

let result = url . branch
exec '!echo '.result

I only ever see url in the output, and never branch. I can echo branch by itself and that works, I can put branch before url, but url . branch does not work. Is vimscript trying to evaluate the url as a substitute command? I'm not sure why this isn't working.

Vim version is compiled from v8.2.4236

1
  • 3
    Do you have a complete example that can be copy/pasted and run to reproduce the issue? What you've posted seems fine to me (other than the missing slash in the result variable, but that's not really what the question is about). Commented Dec 15, 2022 at 5:49

0