Re: [PATCH 5/8] test-lib.sh: Add a test_set_editor function to safely set $VISUAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bryan Donlan schrieb:
> +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 VISUAL

Clever! 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux