Environment Variables
nfarrar opened this issue · 3 comments
nfarrar commented
I just switched from the python version of assh to the go version. Very nice - I love the switch from ini to yaml. :) A couple questions:
The docs say environment variable expansion is supported, but the following doesn't seem to be expanded:
defaults:
User: nfarrar
Port: 22
IdentityFile: $XDG_DATA_HOME/ssh/default/id_rsa
includes:
- $XDG_DATA_HOME/ssh/**/*.yml
Should this work?
moul commented
@nfarrar I wanted to refactor the variable expansion by switching from Python to Golang, I probably missed to port this here
I think the one in includes
will already works, but the one in IdentityFile
won't yet
I will fix that
moul commented
Fixed in git
Can you rebuild assh
and retry ?
milkpirate commented
Ok, 3 things:
- I still have the problem of
assh
not expanding env vars - go builds are only available untill "v2.9.1"...
- ...and this version is not even 2.9.1
See below:
$ head -n6 ~/.ssh/assh.yml
ASSHBinaryPath: /usr/bin/assh
defaults:
# Defaults are applied to each hosts
User: $USER
Port: 22
$ echo $USER
ma-user-naim
$ wget https://github.com/moul/assh/releases/download/v2.9.1/assh_linux_amd64
$ ./assh_linux_amd64 config build
...
SendEnv TERM=xterm
User $USER
ProxyCommand /usr/bin/assh connect --port=%p %h
# ...
$ ./assh_linux_amd64 --version
assh version 2.8.0+dev (HEAD)