# ps -p $$ -o comm=
t_pid=$(ps -p $$ -o ppid=)
ps -p "${t_pid}" -o args=

which_shell() {
  ps -p $$ -o comm= 2>/dev/null | while read -r name _; do
    # print only process name, not full path
    printf '%s\n' "${name##*/}"
  done
}
