From: Johannes Sixt Date: Sun, 10 May 2009 10:59:07 GMT Subject: Re: [PATCH 2/2] completion: enhance "current branch" display Message-ID: <200905101259.07175.j6t@kdbg.org> In-Reply-To: <7vvdo91glm.fsf@alter.siamese.dyndns.org> On Sonntag, 10. Mai 2009, Junio C Hamano wrote: > b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." || While you are here, you could turn this line into { b=$(< "$g/HEAD") && b=${b:0:7}...; } 2>/dev/null || to save a process. $(< foo) is a bash feature and does the same as $(cat foo), but faster. -- Hannes