See also: Show HN: Turn your fzf into a live REPL (paweldu.dev)
#!/usr/bin/env bash
#!/usr/bin/env bash | |
# https://stackoverflow.com/a/78932988/11255791 | |
alias nvimdiff='nvim -d' | |
nvimgitdiff() { | |
if [[ "$#" == 2 ]]; then | |
local ref=${1} | |
local gitrelfp=${2} | |
gitfullfp=$(git ls-files --full-name $gitrelfp) | |
fname=$(basename ${gitrelfp}) |
-- inspired by | |
-- https://gist.github.com/Leenuus/7a2ea47b88bfe16430b42e4e48122718 | |
-- https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7 | |
local function duckdb(args) | |
local range = args.range | |
local line1 = args.line1 - 1 | |
local line2 = args.line2 | |
line2 = line1 == line2 and line1 + 1 or line2 | |
local stdin = vim.api.nvim_buf_get_lines(0, line1, line2, false) |
See also: Show HN: Turn your fzf into a live REPL (paweldu.dev)
#!/usr/bin/env bash