fix trash-put dates
This commit is contained in:
parent
195d4774d9
commit
7cb71a8857
|
@ -9,7 +9,6 @@ set wrapscroll
|
|||
set period 1
|
||||
set previewer ~/.config/lf/preview
|
||||
set cleaner ~/.config/lf/clean
|
||||
# set drawbox
|
||||
set cursorpreviewfmt "\033[7;90m"
|
||||
set promptfmt "\033[34;1m%u\033[36m@\033[34m%h \033[35m[\033[0;1m%d\033[35m]\033[32m » \033[33m%f\033[0m"
|
||||
|
||||
|
@ -47,18 +46,10 @@ cmd delete ${{
|
|||
}}
|
||||
|
||||
cmd trash ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "trash?[y/N]"
|
||||
read ans
|
||||
clear
|
||||
if [ $ans = "y" ]; then
|
||||
for f in $fx; do
|
||||
echo $f
|
||||
trash-put $f &
|
||||
done
|
||||
fi
|
||||
for f in $fx; do
|
||||
echo $f
|
||||
trash-put $f &
|
||||
done
|
||||
}}
|
||||
|
||||
cmd rsyncto ${{
|
||||
|
@ -93,7 +84,6 @@ cmd link %{{
|
|||
lf -remote "send clear"
|
||||
}}
|
||||
|
||||
cmd setbg "$1"
|
||||
cmd bulkrename $vidir
|
||||
|
||||
cmd on-cd &{{
|
||||
|
@ -113,7 +103,13 @@ cmd paste &{{
|
|||
mode="$1"
|
||||
shift
|
||||
case "$mode" in
|
||||
copy) cp -rn -- "$@" .;;
|
||||
copy)
|
||||
rsync -av --ignore-existing --progress -- "$@" . |
|
||||
stdbuf -i0 -o0 -e0 tr '\r' '\n' |
|
||||
while IFS= read -r line; do
|
||||
lf -remote "send $id echo $line"
|
||||
done
|
||||
;;
|
||||
move) mv -n -- "$@" .;;
|
||||
esac
|
||||
rm ~/.local/share/lf/files
|
||||
|
@ -157,14 +153,10 @@ cmd fzfmarks ${{
|
|||
[ -d $file ] && lf -remote "send $id cd $file" && return 0
|
||||
[ -f $file ] && lf -remote "send $id select $file"
|
||||
}}
|
||||
cmd fzfshortcutfiles ${{
|
||||
file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-files | fzf)"
|
||||
lf -remote "send $id select $file"
|
||||
}}
|
||||
cmd fzfshortcutdirs ${{
|
||||
file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-dirs | fzf)"
|
||||
[ -d $file ] && lf -remote "send $id cd $file"
|
||||
lf -remote "send $id select $file"
|
||||
cmd fzfshortcut ${{
|
||||
file="$(cat ${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc | cut -d '"' -f2 | fzf)"
|
||||
[ -d $file ] && lf -remote "send $id cd $file" && return 0
|
||||
[ -f $file ] && lf -remote "send $id select $file"
|
||||
}}
|
||||
cmd fzfgrep ${{
|
||||
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
|
||||
|
@ -181,10 +173,8 @@ cmd fzfgrep ${{
|
|||
map <c-c>a fzfsearch
|
||||
map <c-c>t fzftags
|
||||
map <c-c>m fzfmarks
|
||||
map <c-c>f fzfshortcutfiles
|
||||
map <c-c>d fzfshortcutdirs
|
||||
map <c-c>f fzfshortcut
|
||||
map <c-c>g fzfgrep
|
||||
map J $dir=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf) && lf -remote "send $id cd $(eval echo $dir)"
|
||||
map D trash
|
||||
map <c-d> $trash-restore $PWD
|
||||
map T delete
|
||||
|
|
|
@ -23,6 +23,6 @@ find "$filedir" -regex ".*$filename.*" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n
|
|||
cat <<EOF >"$infodir/$(basename "$filedest")"
|
||||
[Trash Info]
|
||||
Path=$filepath
|
||||
DeletionDate=$(date +%Y%m%dT%T)
|
||||
DeletionDate=$(date -u +%Y%m%dUTC%T)
|
||||
EOF
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue