X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/4be19aacd0842e9e434e6c6795244fdb13689a33..154cb0f1671c05c0dfb5ec1c13c3a1fe06983692:/mr diff --git a/mr b/mr index 67196ca..ccc7647 100755 --- a/mr +++ b/mr @@ -960,14 +960,19 @@ sub register { #{{{ # Find the closest known mrconfig file to the current # directory. $directory.="/" unless $directory=~/\/$/; + my $foundconfig=0; foreach my $topdir (reverse sort keys %config) { next unless length $topdir; if ($directory=~/^\Q$topdir\E/) { $ENV{MR_CONFIG}=$configfiles{$topdir}; $directory=$topdir; + $foundconfig=1; last; } } + if (! $foundconfig) { + $directory=""; # no config file, use builtin + } } if (@ARGV) { my $subdir=shift @ARGV;