summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-06-17 09:10:43 +0200
committermakefu <github@syntax-fehler.de>2020-06-17 09:10:43 +0200
commitd338a947567bae2a3340e4eb01189281fc5aba8b (patch)
tree9b14d13e63ccc71669ad4545d46a75b7a3cae3ba /lass
parent28e030be5616b96595bc6a1a327f5d5974555bed (diff)
parentbde301139df5474a72f79122f81feab1d6387a07 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass')
-rw-r--r--lass/5pkgs/fzfmenu/default.nix55
1 files changed, 0 insertions, 55 deletions
diff --git a/lass/5pkgs/fzfmenu/default.nix b/lass/5pkgs/fzfmenu/default.nix
deleted file mode 100644
index 64e95d233..000000000
--- a/lass/5pkgs/fzfmenu/default.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ pkgs, ... }:
-
-pkgs.writeDashBin "fzfmenu" ''
- set -efu
- PROMPT=">"
- for i in "$@"
- do
- case $i in
- -p)
- PROMPT="$2"
- shift
- shift
- break
- ;;
- -l)
- # no reason to filter number of lines
- LINES="$2"
- shift
- shift
- break
- ;;
- -i)
- # we do this anyway
- shift
- break
- ;;
- *)
- echo "Unknown option $1" >&2
- shift
- ;;
- esac
- done
- INPUT=$(${pkgs.coreutils}/bin/cat)
- OUTPUT="$(${pkgs.coreutils}/bin/mktemp)"
- if [ -z ''${TERM+x} ]; then #check if we can print fzf in the shell
- ${pkgs.rxvt_unicode}/bin/urxvt \
- -name fzfmenu -title fzfmenu \
- -e ${pkgs.dash}/bin/dash -c \
- "echo \"$INPUT\" | ${pkgs.fzf}/bin/fzf \
- --history=/dev/null \
- --print-query \
- --prompt=\"$PROMPT\" \
- --reverse \
- > \"$OUTPUT\"" 2>/dev/null
- else
- echo "$INPUT" | ${pkgs.fzf}/bin/fzf \
- --history=/dev/null \
- --print-query \
- --prompt="$PROMPT" \
- --reverse \
- > "$OUTPUT"
- fi
- ${pkgs.coreutils}/bin/tail -1 "$OUTPUT"
- ${pkgs.coreutils}/bin/rm "$OUTPUT"
-''