#!/bin/sh
# À inclure dans son .shrc

dl()
{
	# darcs log embarque son propre pagineur, malheureusement il ne lui transmet pas les 'q' pour quitter.
	darcs log "$@" | less
}

dw()
{
	DARCS_ALWAYS_COLOR=1 darcs w "$@" | less -RFX
}

# Darcs Whatsnew Récents.
dwr()
{
	local njours=10
	case "$1" in
		*[^0-9]*|"") true ;;
		*) njours="$1" ; shift ;;
	esac
	dw "$@" `find . -mindepth 1 -not -path "./_darcs/*" -not -path "./.git/*" -mtime -$njours | grep -v util.loca`
}

#- Projets ---------------------------------------------------------------------
# Fonctionnement dans le cadre de rcs/shrc.

testi_darcs()
{
	[ -d "$1/_darcs" ] || return
	
	local init
	for init in $DANSPROJET_TESTI_DARCS
	do
		$init "$1"
	done
}

DANSPROJET_TESTI="$DANSPROJET_TESTI testi_darcs"
DANSPROJET_TESTI_DARCS=
