aboutsummaryrefslogtreecommitdiff
path: root/nixos/profiles/workstation/scripts/ed
blob: e6c23d3856a8b0d5e9cb2037995cad625e3a5da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash

list_files() {
    if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
        git -c core.quotePath=false ls-files --cached --others --exclude-standard
    else
        find . -type f -not -path "*/.*"
    fi
}

files=$(list_files | sk --no-info "$@") || exit
$VISUAL "$files"