summaryrefslogtreecommitdiff
path: root/.local/bin/lf-select
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-07 15:31:56 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-07 15:31:56 +0100
commit29f7b14e9e0c498052dda570353b41e9333d6191 (patch)
tree67d7e45fc6df0b560b919849c48d8fc5d92081b4 /.local/bin/lf-select
parentb8cad9102fc1d42712364b48bcbff1998d429fbe (diff)
Add some of Luke Smith's scripts
Diffstat (limited to '.local/bin/lf-select')
-rwxr-xr-x.local/bin/lf-select9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/lf-select b/.local/bin/lf-select
new file mode 100755
index 0000000..3b2a17a
--- /dev/null
+++ b/.local/bin/lf-select
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Reads file names from stdin and selects them in lf.
+
+while read -r file; do
+ [ -z "$file" ] && continue
+ lf -remote "send select \"$file\""
+ lf -remote "send toggle"
+done