Re: [PATCH 5/8] test-lib.sh: Add a test_set_editor function to safely set $VISUAL
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Apr 9, 2008, 06:36 UTC
- Message-ID
- <47FC6400.8010606@viscovery.net>
- In-Reply-To
- <1207704604-30393-5-git-send-email-bdonlan@fushizen.net>
Bryan Donlan schrieb:
Show 7 quoted lines
> +test_set_editor () {
> + # If the editor path contains a quote, just using VISUAL='"path"' isn't
> + # enough.
> + FAKE_EDITOR="$1"
> + export FAKE_EDITOR
> + VISUAL='"$FAKE_EDITOR"'
> + export VISUALClever! It assumes that $VISUAL is always run as sh -c "$VISUAL ...", but I think this assumption is valid. A hint along these lines in the comment could turn out helpful.
-- Hannes