You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want a way to get a quick view of tree's output that can fit on a single screen. I wrote a shell script for it, but I think that this might offer the best solution. I want to give this program a mode that emulates what my script does whilst retaining the extra shortcuts and interactivity of clifm.
Describe the solution you'd like
Have a tree mode that will prints a recursive tree instead of the standard ls with the eln numbers. This mode should work with the file filters as well to give the user very powerful scanning capabilities. There should also be bindings to increment or decrement the depth level as well.
Describe alternatives you've considered
I wrote a fish shell to view the tree output more comfortably, but I realized that this program has potential to offer a much better solution. Here it is if you wan to see it 😝
function itree --description'Interactive tree viewer'function path_join
echo (string join / $argv[1] (command realpath --relative-to=$argv[1] $argv[2]))
endset select (tree -nd$argv[1] |sed-e'1d'-e'$d'| fzy |awk'{print $NF}')
set next (path_join $argv[1] $select)
# If user selects a deep directory then fill in the missing componentsif [ ! -d$next ]
set select (fd --prune-t d -g"**/"(basename$next) -1$argv[1])
endset next (path_join $argv[1] $select)
set--global tre (realpath $next)
# Is this the bottom?if [ (tree -nd$select|tail-n 1 |cut-d''-f 1) -eq 0 ]
read-P"It goes no deeper. What do now? (p/l) " response
switch$responsecase p
echo (realpath $next)
case l
ls$nextendreturn 0
endread-P"What do? (p/t/l/c) " response
switch$responsecase p
echo (realpath $next)
case t
tree $nextcase c
itree $nextcase l
ls$nextendend
If you have fish you can install fd and tree and run it yourself to get a basic idea of what I'm describing.
EDIT: Add command to ensure we're using GNU realpath and not the one supplied by fish.
The text was updated successfully, but these errors were encountered:
A built-in tree view mode would be a killer feature, for sure, but it's not planned for now (though it is already in my TODO list). The closest we have, much similar to your script, is a flat view provided by the fzfsel.sh plugin (invoked via the * action). To run this plugin in flat view mode issue:
* -f
But yes, implemented this way (externally) we lose all of clifm's interactivity.
Is your feature request related to a problem? Please describe.
I want a way to get a quick view of
tree
's output that can fit on a single screen. I wrote a shell script for it, but I think that this might offer the best solution. I want to give this program a mode that emulates what my script does whilst retaining the extra shortcuts and interactivity of clifm.Describe the solution you'd like
Have a
tree
mode that will prints a recursive tree instead of the standardls
with the eln numbers. This mode should work with the file filters as well to give the user very powerful scanning capabilities. There should also be bindings to increment or decrement the depth level as well.Describe alternatives you've considered
I wrote a fish shell to view the
tree
output more comfortably, but I realized that this program has potential to offer a much better solution. Here it is if you wan to see it 😝If you have fish you can install
fd
andtree
and run it yourself to get a basic idea of what I'm describing.EDIT: Add
command
to ensure we're using GNU realpath and not the one supplied by fish.The text was updated successfully, but these errors were encountered: