My fish config
This commit is contained in:
10
functions/clean-music.fish
Normal file
10
functions/clean-music.fish
Normal file
@@ -0,0 +1,10 @@
|
||||
function clean-music
|
||||
for mood in $(find ~/Músicas -name "*.mood")
|
||||
set path (dirname "$mood")
|
||||
set file (basename (string split -m1 -r '.' "$mood") | cut -c2-)
|
||||
if test -z (find "$path" -name "$(bash -c "printf \"%q\" \"$file\"").*" -print -quit)
|
||||
rm -v "$mood"
|
||||
end
|
||||
end
|
||||
find ~/Músicas -type d -empty -print -delete
|
||||
end
|
||||
Reference in New Issue
Block a user