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/common/bin/ltld

14 lines
279 B
Plaintext
Raw Normal View History

2020-11-06 11:16:29 -06:00
#!/usr/bin/env fish
# Echoes the newest subdirectory 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