This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/ltl

14 lines
273 B
Fish
Executable file

#!/usr/bin/env fish
# Echoes the newest file in the specified directory (or current directory if none is given)
set d $argv[1] .
set -l l ""
for f in $d[1]/*
if test -z $l; set l $f; continue; end
if command test $f -nt $l; and test ! -d $f
set l $f
end
end
echo $l