App-CdUtils

 view release on metacpan or  search on metacpan

script/cdnextsibling-backend  view on Meta::CPAN

# FRAGMENT id=shcompgen-hint completer=1 for=cdprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=cdnextsibling

# FRAGMENT id=shcompgen-hint completer=1 for=gdprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=gdnextsibling

# FRAGMENT id=shcompgen-hint completer=1 for=lsprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=lsnextsibling

my $cwd = $ENV{PWD} || cwd();
my @cwd_elems = split m!/+!, $cwd;
my $cmd = $0 =~ /prev/ ? 'cdprevsibling' : 'cdnextsibling';
my $sort_files_opts = $ENV{CDPREVNEXTSIBLING_SORT_FILES_OPTS} // '--by-field=name';
my %opts = (
    num => 1,
    level => 1,
    action => 'cd',
);

GetOptionsWithCompletion(
    sub {

script/cdpart-backend  view on Meta::CPAN

our $DATE = '2026-04-07'; # DATE
our $DIST = 'App-CdUtils'; # DIST
our $VERSION = '0.015'; # VERSION

# FRAGMENT id=shcompgen-hint completer=1 for=cdpart

our $DEBUG = $ENV{DEBUG};
our $COMPLETE_MAX_ENTRIES_PER_LEVEL = $ENV{CDPART_COMPLETE_MAX_ENTRIES_PER_LEVEL} // 100;

my $cwd = $ENV{PWD} || cwd();
my @cwd_elems = split m!/+!, $cwd;

GetOptionsWithCompletion(
    sub {
        my %args = @_;
        my $type = $args{type};
        my $word = $args{word};

        return undef unless $type eq 'arg'; ## no critic: Subroutines::ProhibitExplicitReturnUndef
        my @res;

script/cdprevsibling-backend  view on Meta::CPAN

# FRAGMENT id=shcompgen-hint completer=1 for=cdprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=cdnextsibling

# FRAGMENT id=shcompgen-hint completer=1 for=gdprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=gdnextsibling

# FRAGMENT id=shcompgen-hint completer=1 for=lsprevsibling
# FRAGMENT id=shcompgen-hint completer=1 for=lsnextsibling

my $cwd = $ENV{PWD} || cwd();
my @cwd_elems = split m!/+!, $cwd;
my $cmd = $0 =~ /prev/ ? 'cdprevsibling' : 'cdnextsibling';
my $sort_files_opts = $ENV{CDPREVNEXTSIBLING_SORT_FILES_OPTS} // '--by-field=name';
my %opts = (
    num => 1,
    level => 1,
    action => 'cd',
);

GetOptionsWithCompletion(
    sub {

script/cdtree-backend  view on Meta::CPAN

                my $found = _search($wanted, "$dir/$entry", [@$direlems, $entry]);
                chdir ".." or die "cdtree: ERROR: Can't chdir back to $dir: $!\n";
                return $found if $found;
            }
        }
    }

    undef;
}

my $found = _search($ARGV[0], $cwd, [split m!/+!, $cwd], 1);

if ($found) {
    print "$found\n";
} else {
    warn "cdtree: Can't find any match, giving up\n" if $DEBUG;
    print ".\n";
}

# ABSTRACT: Search tree for your directory
# PODNAME: cdtree-backend



( run in 0.335 second using v1.01-cache-2.11-cpan-d0baa829c65 )