src

sauce
got clone ssh://anon@src.dalliard.ch/src
log | files | refs

commit 1ea537668a763990ea7a9c38c4f982ea38a21f22
parent 33dac15a3ab455fab748cc2ccca0aeef402ef2c7
author: nathanael <nathanael@dalliard.ch>
date:   Wed, 22 Oct 2025 10:47:58 +0000

s0: up bin fopen/fdel

diffstat:
Ms0/dotfiles/bin/fdel | 9+++++----
Ms0/dotfiles/bin/fopen | 13+++++--------
2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/s0/dotfiles/bin/fdel b/s0/dotfiles/bin/fdel @@ -1,5 +1,6 @@ #!/bin/sh -file=$(cat /tmp/filepath.txt) -[ -f "$file" ] && { - rm -i "$file" -} +f="/tmp/files.txt" +s=$(fzy < "$f") +[ -n "$s" ] && \ + rm -i "$s" && \ + sed -i "\|^${s}$|d" "$f" diff --git a/s0/dotfiles/bin/fopen b/s0/dotfiles/bin/fopen @@ -1,11 +1,8 @@ #!/bin/sh -[ $# -eq 0 ] && { - file=$(find . \( \ +f=${1:-$(find . \( \ -path './.*' -o \ -name 'src' \ - \) -prune -o -type f -print | fzy) -} || file=$1 -[ -n "$file" ] && { - readlink -f "$file" > /tmp/filepath.txt - open "$file" || ${EDITOR:-vi} "$file" -} + \) -prune -o -type f -print | fzy)} +[ -n "$f" ] && \ + readlink -f "$f" >> /tmp/files.txt && \ + (open "$f" || ${EDITOR:-vi} "$f")