std app called "env" shows all variables when logged in, look for value exact/aproximating the dev TTY device (Im using SSH_TTY for now), when using bash, on login first .bash_profile is executed, then .bash_login (if necessary), then .bashrc. user-specific aliases are in .bashrc, we can have either .bash_profile or .bashrc check for a few values, and assign the alias like:
TTY=$(echo $SSH_TTY | cut -d "/" -f 3 | cut -c 1-4)
if [ $TTY = ttyp ]; then
alias ls='ls -a --color'
else
alias ls='ls -a'
fi
1. insert for "$SSH_TTY" the /dev/tty value u want (get from env), the "TTY=" line will return the 1st 4 chars like "ttyS"
2. same for "ttyp"
HTH
|