0

I am creating completions for TCSH. Is it possible to use environment variables in completion?

I added something like below where $ROOT is the environment variable

    complete go \
      "p@1@D:$ROOT/@"

But when I try to ssh into the box it gives an error saying $ROOT is not known. $ROOT would be set later by sourcing a file once i ssh and would change depending on the directory I am in.

Thanks in advance :)

justrajdeep
  • 855
  • 3
  • 12
  • 29

1 Answers1

0

You don't have $ROOT variable. The complete try to evaluate the expression and the $ROOT doesn't exist.

I think you misunderstand this complete. The evaluation is "build-time" (at execute of complete) not "run-time" (when you try complete with TAB the command go).

uzsolt
  • 5,832
  • 2
  • 20
  • 32