squirt icon indicating copy to clipboard operation
squirt copied to clipboard

Ability to read hostname from env

Open fredrik-rambris opened this issue 10 months ago • 1 comments

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

fredrik-rambris avatar Apr 10 '24 20:04 fredrik-rambris

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
}

kowoba avatar Apr 10 '24 21:04 kowoba