summaryrefslogtreecommitdiffstats
path: root/.config/nnn/plugins/joe_fzfcd
diff options
context:
space:
mode:
Diffstat (limited to '.config/nnn/plugins/joe_fzfcd')
-rwxr-xr-x.config/nnn/plugins/joe_fzfcd21
1 files changed, 21 insertions, 0 deletions
diff --git a/.config/nnn/plugins/joe_fzfcd b/.config/nnn/plugins/joe_fzfcd
new file mode 100755
index 0000000..13ac1a5
--- /dev/null
+++ b/.config/nnn/plugins/joe_fzfcd
@@ -0,0 +1,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__