alpine9000 / squirt

squirt - Remotely manage your Amiga over TCP/IP from modern systems
GNU General Public License v3.0
33 stars 5 forks source link

Ability to read hostname from env #15

Open fredrik-rambris opened 7 months ago

fredrik-rambris commented 7 months ago

Often you are working with a single Amiga. It would be nice if say SQUIRT_HOST is set in env then the hostname command line argument could be skipped

kowoba commented 7 months ago

You can already get this just by using shell functions as wrapper, I use the variable AMIHOST with a default vaule 10.99.0.2

amiget () {
  squirt_suck ${AMIHOST:-10.99.0.2} ${1} >&2
}
amiput () {
  if test -n "${2}"
    then
      squirt --dest="${2}" ${AMIHOST:-10.99.0.2} ${1} >&2
    else
      squirt ${AMIHOST:-10.99.0.2} ${1} >&2
  fi
}