summaryrefslogtreecommitdiffstats
path: root/.config/nnn
diff options
context:
space:
mode:
Diffstat (limited to '.config/nnn')
-rwxr-xr-x.config/nnn/plugins/joe_fzfcd2
-rwxr-xr-x.config/nnn/plugins/joe_fzfjump20
-rwxr-xr-x.config/nnn/plugins/joe_rand2
3 files changed, 22 insertions, 2 deletions
diff --git a/.config/nnn/plugins/joe_fzfcd b/.config/nnn/plugins/joe_fzfcd
index 13ac1a5..b4df9a4 100755
--- a/.config/nnn/plugins/joe_fzfcd
+++ b/.config/nnn/plugins/joe_fzfcd
@@ -7,7 +7,7 @@ use Env qw(NNN_PIPE PWD);
sub main {
my $dir;
- $dir = `fd -t d -L | fzf --preview ' eza --color=always --icons -T -L1 {} |
+ $dir = `fd -t d -L | fzf --preview ' eza --color=always -T -L1 {} |
head -n 200'`;
chomp($dir);
open(FH, '>>', $NNN_PIPE) or die $!;
diff --git a/.config/nnn/plugins/joe_fzfjump b/.config/nnn/plugins/joe_fzfjump
new file mode 100755
index 0000000..dc918f3
--- /dev/null
+++ b/.config/nnn/plugins/joe_fzfjump
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Env qw(NNN_PIPE PWD);
+
+sub main {
+ my $file;
+
+ $file = `fd -L | fzf`;
+ chomp($file);
+ open(FH, '>>', $NNN_PIPE) or die $!;
+ print FH '0c' . $PWD . '/' . $file;
+ close(FH);
+ return;
+}
+
+main();
+
+__END__
diff --git a/.config/nnn/plugins/joe_rand b/.config/nnn/plugins/joe_rand
index edc71c1..100181a 100755
--- a/.config/nnn/plugins/joe_rand
+++ b/.config/nnn/plugins/joe_rand
@@ -13,7 +13,7 @@
. "$(dirname "$0")"/.nnn-plugin-helper
file=$(command ls | shuf | head -n1 | tr -d '\n')
-printf "%s" "0l$file" > "$NNN_PIPE"
+printf "%s" "0c$PWD/$file" > "$NNN_PIPE"
# printf "%s" "+l" > "$NNN_PIPE"
# if type mimetype >/dev/null 2>&1; then
# find . | mimetype -f - | grep "$mime" | awk -F: '{printf "%s%c", $1, 0}' > "$NNN_PIPE"