michael@0: #! perl michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: require "fastcwd.pl"; michael@0: michael@0: $_ = &fastcwd; michael@0: if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) { michael@0: print("$_\n"); michael@0: } elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o) michael@0: && readlink("/u/$user") eq "/usr/people/$user") { michael@0: print("/u/$user/$rest\n"); michael@0: } else { michael@0: chop($host = `hostname`); michael@0: print("/h/$host$_\n"); michael@0: }