mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-12-12 13:33:43 +08:00
24 lines
431 B
Fish
24 lines
431 B
Fish
function pacdisowned -d "Display list of disowned files"
|
|
if test -d $TMPDIR
|
|
set tmp "/tmp"
|
|
else
|
|
set tmp $TMPDIR
|
|
end
|
|
|
|
set dir (mktemp -d -p $tmp)
|
|
|
|
set -l fs "$dir/fs"
|
|
set -l db "$dir/db"
|
|
|
|
pacman -Qlq | sort -u > "$db"
|
|
|
|
find /bin /etc /lib /sbin /usr ! -name lost+found \
|
|
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
|
|
|
|
comm -23 "$fs" "$db"
|
|
|
|
# clean-up after ourself
|
|
rm -rf "$dir"
|
|
end
|
|
|