Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

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

 



On Sun, Jan 27, 2013 at 01:24:45PM -0800, David Aguilar wrote:
> +filter_tools () {
> +	filter="$1"
> +	prefix="$2"
> +	(
> +		cd "$MERGE_TOOLS_DIR" &&
> +		for i in *
> +		do
> +			echo "$i"
> +		done
> +	) | sort | while read tool
> +	do
> +		setup_tool "$tool" 2>/dev/null &&
> +		(eval "$filter" "$tool") &&
> +		printf "$prefix$tool\n"
> +	done
> +}

Can we change this so that it does this:

    filter_tools () {
    	filter="$1"
    	(
    		cd "$MERGE_TOOLS_DIR" &&
    		for i in *
    		do
    			echo "$i"
    		done
    	) |
        while read tool
    	do
    		setup_tool "$tool" 2>/dev/null &&
    		(eval "$filter" "$tool") &&
    		echo "$tool"
    	done
    }

and keep the sorting and prefix in show_tool_help?  This will make it
easier to integrate the user-configured tools from git-config.


John
--
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]