[Xquartz-dev] 2.3.2_rc4
Martin Costabel
costabel at wanadoo.fr
Fri Dec 26 07:04:05 PST 2008
Harald Hanche-Olsen wrote:
> Uh, sorry, there was one more thing ... if a former bash user has
> converted to another shell, and still has his bash login stuff lying
> around, it will be run in addition to the other shell's login files. I
> think that is wrong. Therefore I believe this version is better:
>
> #!/bin/sh
>
> set "$(dirname "$0")"/X11.bin "${@}"
>
> if [ -x ~/.x11run ]; then
> exec ~/.x11run "${@}"
> fi
>
> case $(basename "${SHELL}") in
> bash) exec "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;
> ksh|sh|zsh) exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;;
> csh|tcsh) exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;;
> es|rc) exec -l "${SHELL}" -c 'exec $*' "${@}" ;;
> *) exec "${@}" ;;
> esac
Looks good to me.
--
Martin
More information about the Xquartz-dev
mailing list