summaryrefslogtreecommitdiffstats
path: root/.config/nnn/plugins/joe_fzfcd
blob: 13ac1a5393a0dd7fcd4e926ae2adaf16edf81bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl

use strict;
use warnings;
use Env qw(NNN_PIPE PWD);

sub main {
	my $dir;

	$dir = `fd -t d -L | fzf --preview ' eza --color=always --icons -T -L1 {} |
		head -n 200'`;
	chomp($dir);
	open(FH, '>>', $NNN_PIPE) or die $!;
	print FH '0c' . $PWD . '/' . $dir;
	close(FH);
	return;
}

main();

__END__