fixed some lfrc issues with fish-shell

This commit is contained in:
_N0x 2024-01-20 11:59:21 +01:00
parent 891df806ae
commit 7b59554e7c

View File

@ -45,46 +45,11 @@ cmd open ${{
end end
}} }}
cmd bulkrename ${{
set tmpfile_old (mktemp)
set tmpfile_new (mktemp)
if test -n "$fs"
set fs (basename -a $fs)
else
set fs (ls)
end
echo "$fs" > "$tmpfile_old"
echo "$fs" > "$tmpfile_new"
$EDITOR "$tmpfile_new"
if test (wc -l < "$tmpfile_old") -eq (wc -l < "$tmpfile_new")
paste "$tmpfile_old" "$tmpfile_new" | while IFS="$(printf '\t')" read -r src dst
if test "$src" = "$dst" -o -e "$dst"
mv -- "$src" "$dst"
end
end
else
rm -f "$tmpfile_old" "$tmpfile_new"
exit 1
end
rm -f "$tmpfile_old" "$tmpfile_new"
lf -remote "send $id unselect"
}}
cmd move-parent &{{
set dironly "setlocal (dirname "$PWD") dironly"
lf -remote "send $id :updir; $dironly true; $argv; $dironly false; open"
}}
### Mappings and stuff ### ### Mappings and stuff ###
map C edit-config map C edit-config
map J move-parent down map J :updir; set dironly true; down; set dironly false; open
map K move-parent up map K :updir; set dironly true; up; set dironly false; open
map o open; map o open;
map <c-s> set hidden! map <c-s> set hidden!
map B bulkrename