[feature request] Show only direct dependencies
Closed this issue · 2 comments
mid-kid commented
I'd like to list only the direct dependencies of a binary or library. Line readelf -p <file> | grep 'NEEDED'
does, but with the prettier output (and more concise command) this tool provides.
This is useful for making sure I get my dependency specifications right for a package.
haampie commented
Hi mid-kid, seems like a reasonable suggestion. Maybe --max-depth 1
or --depth 1
?
Would be good to check what common flag names are for those. So far it seems it's not very consistent:
find
has-maxdepth
;tree
has-L
for level;fd
has-d
,--max-depth
haampie commented
Can you try out the 3.1 release branch, it has --max-depth
.
curl -Lfs https://raw.githubusercontent.com/haampie/libtree/release/3.1/libtree.c | ${CC:-cc} -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64