Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.07 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.07 KB

copy or jump to recently edited files feature

  • concept of jump to recently edited files feature or copy their filenams
  • created script zet/20231129161540/modified-file-timestamps
  • created zet/20231129161540/get-recent-file to run fzf and return a file
  • after selecting a file, zkvr should ask what you want to do: copy the path, edit the file, navigate there, etc.
#!/bin/bash
find /path/to/directory -type f -print0 | xargs -0 ls -lt

find zet -type f -print0 | xargs -0 ls --full-time

# simple find recent
find zet -type f -print0 | xargs -0 ls --full-time | awk '
{
  gsub(/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* */,"")
  print
}
' | sort
  • version for mac and linux
if [[ $(uname) =~ Darwin ]]; then
  find zet -type f -print0 | xargs -0 stat -f $'%m\t%N'
else
  find zet -type f -print0 | xargs -0 stat -c $'%Y\t%n'
fi | sort

zet/20231129161540/README.md

Related

Tags:

#script #enhancement #workflow