#!/usr/bin/perl -w
-# Copyright (C) 2000-2001 Simon Huggins
+# Copyright (C) 2000-2003 Simon Huggins
# asktag chooses a tag like catsig chooses a sig.
# This program is free software; you can redistribute it and/or modify it
use strict;
return if $cfg{'notag'};
+return unless $cfg{'asktag'};
open(SIG, "<$cfg{'tmpsigfile'}") or htagdie "$0: Could not open $cfg{'tmpsigfile'}: $!\n";
my @sig=<SIG>;
chomp $sig[-1];
print STDERR @sig;
-print STDERR "\n\nOK? ([Y]es/(n)ew Tag/(q)uit)\n";
+print STDERR "\n\nOK? ([Y]es/(n)ew Tag/(b)ack to start/(q)uit)\n";
$_ = <STDIN>;
-return 255 if /^q(?:uit)?/i;
-return if /^(?:y(?:es)?|\n)/i;
+return 255 if /^q(?:uit)?/i;
+return 2 if /^b(?:ack)?/i;
+return if /^(?:y(?:es)?|\n)/i;
# Remove sig, and copy old sig (unmerged copy) back over the top
unlink($cfg{'tmpsigfile'}) or htagdie "Could not remove $cfg{'tmpsigfile'}: $!\n";