commit 372f6d4c5247f3321b37012318c96d317bca3821
parent 30139a9977e6ba56e9a4086abe68c19cf241ba5f
author: nathanael <nathanael@dalliard.ch>
date: Fri, 17 Oct 2025 15:32:36 +0000
s0: save location of opened file
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/s0/dotfiles/bin/fopen b/s0/dotfiles/bin/fopen
@@ -3,7 +3,8 @@ file=$(find . \( \
-path './.*' -o \
-name 'src' \
\) -prune -o -type f -print | fzy)
-
[ -n "$file" ] && {
+ path=$(readlink -f "$file")
+ echo "$path" > /tmp/filepath.txt
open "$file" || ${EDITOR:-vi} "$file"
}