this post was submitted on 10 Nov 2023
4 points (100.0% liked)

Neovim

2161 readers
3 users here now

founded 1 year ago
MODERATORS
 

Hi, how can I associate to a var a path with both env variable and text? something like this for example: let trial=$HOME/dir1/dir2/$env1/dir3 I saw that let trial=$HOME works when I echo it, but if I add $HOME/dir1 it doesn't anymore....any help? Thanks

you are viewing a single comment's thread
view the rest of the comments
[โ€“] chimay@lemmy.world 1 points 1 year ago (1 children)

you can use a dot to concatenate strings :

let trial = $HOME . '/dir1/dir2/dir3'
[โ€“] dafunkkk@lemmy.world 1 points 1 year ago

it works!!!....many thanks!!!