Simplify profile_zsh.sh (#212)

Rely on zsh features to simplify profile_zsh.sh file.

- Remove `DADE_REPO_ROOT` as it is not needed anywhere, `dade-assist` redefines
  it already.
- `${0:A:h}` gives the absolute path of the folder *this* file resides in, no
  need for `cd`, `dirname`, and `pwd` combo.
- Use simple process redirection (`<`), as it is more robust than the one in
  bash, and works better than `<<<`
This commit is contained in:
Nikola Knežević 2019-04-05 12:45:34 +02:00 committed by Gerolf Seitz
parent 117f043698
commit 79f8bf0a58

View File

@ -3,5 +3,4 @@
# DADE shell profile compatible with zsh.
export DADE_REPO_ROOT="$(cd $(dirname "${(%):-%N}")/.. > /dev/null && pwd)"
source /dev/stdin <<< "$(${DADE_REPO_ROOT}/dev-env/bin/dade assist)"
source <("${0:A:h}"/bin/dade assist)