23 ms·
Broot – A new way to see and navigate directory trees
- dwrodri 7y agopro-tip: I think a lot of people would really appreciate it if you put a quick blurb about installation at the top of the GitHub README and on Broot's landing page. It took me about 30 or so seconds to find the installation page, which gave me enough time to think that this was still new enough that you don't want to hand it out like crazy yet. Those of us who like to charge in to CLI tools all guns-blazing-like would appreciate it. Also, it would immediately communicate that the project is written in Rust, which some people may like.
- dystroy 7y agoAuthor here: thanks for the tip. I'll do that. edit: done. Note that broot is far from new and is reliable on linux. I used it daily in the past 10 months. The only thing which prevented me from tagging it 1.0 is the rough edges on Windows.
- stinos 7y agorough edges on Windows This could use some documentation imo. Like the essentials of what 'supported on Win10+' means (is it supported in powershell, or command prompt or bash running on msys or ... ?) and how to laucnh/install it. I only looked briefly, ran broot in cmd but the only thing I get out of broot is that it creates a file <AppData>\Roaming\dystroy\broot\data\launcher\bash\1 and a link (even when entering 'n' instead of 'Y' when it asks to install!!). So I figured it maybe needs to find a 'br' command and added a function 'br' in powershell and launched that, but it still says it's not installed.
- dystroy 7y agoThe problem is I don't know exactly what works or not on windows... I'd need an involved tester/coder familiar with Windows to help me for that (you can volunteer on miaou: https://miaou.dystroy.org/3 https://miaou.dystroy.org/3). Another developer already started to work on a `br` function for windows: https://github.com/Canop/broot/issues/78 https://github.com/Canop/broot/issues/78
- stinos 7y agoAha, so that function is indeed the way to go. I'll chime in.
- asmosoinio 7y agoAs a Mac and brew user I would have needed to see "brew install broot" somewhere - since there is no Mac binary I was not sure how to test this until I looked at the comments here. I am not sure if you have something to do with the "brew" installer for this on MacOS? Or does someone else create that? Anyways, looks awesome, I think I'll use this at least for listing files by size.
- dystroy 7y agoThe reason I don't mention brew today is that I don't manage the formula myself and I don't check it. I'm not even sure of what it does.
- mhandley 7y agobroot looks really useful - thanks! One comment: on the configuration web page, it states: "The easiest way to read and edit broot's configuration file is to go the help screen (using ?) then to type :open." When I do that, I get "verb not found: "open"". Not quite sure what is supposed to happen here. I found the config file and editted it manually, but was some magic supposed to happen with the "open" verb?
- dystroy 7y agoHum... this is quite an outdated part of the documentation, sorry about that. You can do :e
- muststopmyths 7y agowill this work with explorer associations on Windows ? like .doc and .pdf files ?
- wedn3sday 7y agoThis seems like a huge step up from tree, I'm definitely giving this a chance.
- greenn 7y agoThis somewhat reminds of a tool I’ve been working on at https://github.com/digicannon/peek https://github.com/digicannon/peek. Looks like this is further along it’s goals, though.
- 6510 7y agoYou need a new idea! I suggest making a brown tree shaped tree with shades of green for the leaves and a monkey to navigate it using a controller. Brown leaves for deleted files. The monkey shakes the tree and you catch the leaves you want to keep. It can also chew off branches.
- kovek 7y agoThis is awesome!! I read through all the features and I can’t wait to try it tomorrow when I get behind my terminal.
- dod9er 7y agoHmm, looks nice, maybe its time to kick my old (ls,less,vi) workflow :) Btw, anyone using this with another pager for fast source-code viewing ?
- TsiCClawOfLight 7y agoAgreed, but I don't see a use-case for it given that we have ranger[1]. I find the two-pane navigation + embedded preview + easy opening of files when moving into them to be a perfect combination. Given your workflow, you might want to give ranger a try? [1]: https://ranger.github.io/ https://ranger.github.io/
- sullyj3 7y agobat is another nice rust utility, a kind of combination of cat and less with line numbers and colors. If there's more than a screenfull of text it acts as a pager, otherwise like cat.
- NetOpWibby 7y agoCan I install this with brew? I’m currently using exa in place of ls but broot looks neat too.
- kevinastone 7y agohttps://formulae.brew.sh/formula/broot https://formulae.brew.sh/formula/broot
- NetOpWibby 7y agoAh, thanks!
- cujo 7y ago"brew search broot" is a lot fewer characters than your question!
- NetOpWibby 7y agoI never knew this was a thing, wow!
- halayli 7y agoi am still waiting for someone to replicate xtgold... but then I realize the generations gap and how it might never resurface again.
- akho 7y agohttps://www.han.de/~werner/ytree.html https://www.han.de/~werner/ytree.html I don’t know if it’s faithful enough for you
- aepiepaey 7y agoIn addition to the one mentioned by a sibling comment, there are several others: Windows: - http://textmode.netne.net/Extreme.html http://textmode.netne.net/Extreme.html - http://www.ztree.com/ http://www.ztree.com/ Unix: - http://www.unixtree.org/ http://www.unixtree.org/
- ComodoHacker 7y agoIsn't it what file managers like mc are for?
- eps 7y agoThey aren't quite there yet. Still need to realize that having 2 panels side-by-side would eliminate any need for typing when copying and moving stuff around. Also an XTree-like info panels around the tree itself would help tidying the layout and increasing info density. All new is a well-forgotten old.
- Erlich_Bachman 7y agoWhat are you talking about, mc has two panels by default?
- eps 7y agoIt was in reference to the submitted project, not mc.
- Narishma 7y agoWho's 'they'? I think mc has all the stuff you're talking about.
- aargh_aargh 7y agoI tried it and think I'll keep using it mainly for the "See what takes space" mode (I haven't encountered an alternative that works in terminal, but I haven't looked, either).
- PetahNZ 7y agodu -d 1 -h | sort -h
- OskarS 7y agoRemove the "-d 1" and that command gets even more useful. This is my preferred version of that trick: du -h | sort -hr | less
- Phelinofist 7y agoI use NCDU: https://dev.yorhel.nl/ncdu https://dev.yorhel.nl/ncdu
- deleted 7y ago[deleted]
- andy_boot 7y agoThat's why I wrote this: https://github.com/bootandy/dust https://github.com/bootandy/dust Because it was frustrating to track down what had used disk space.
- 7y ago
- bestest 7y agovery nice! but does anyone has an idea if there is a way to customise file sorting?
- dystroy 7y agoNot now. Sorting isn't really compatible with the tree view idea. There's the "fat whales spotting" mode, which only displays one level and sorts by size, though, and I plan to extend this mode to other sortings.
- colordrops 7y agoCan someone make this work like fzf so we can embed it in vim for ctrl-p style plugins? That would be amazing.
- modeless 7y agoLooks cool! You should record some demos with https://asciinema.org/ https://asciinema.org/
- dystroy 7y agoI did in the past but the problem of asccinema for applications like vi or broot is that people don't really understand: you hit two or three keys and the stuff is magically done.
- rmetzler 7y agoIf seen YouTube videos with an overlay of key presses. Unfortunately I’m not sure how to record something like this.
- Joona 7y agoOBS can do this with a plugin: https://github.com/univrsal/input-overlay https://github.com/univrsal/input-overlay
- iicc 7y agoasciinema has a --stdin option to record keypresses - https://discourse.asciinema.org/t/does-asciinema-record-the-passwords-i-type-during-recording-session/23 https://discourse.asciinema.org/t/does-asciinema-record-the-... The bit that's not done yet is rendering an overlay in the web player - https://github.com/asciinema/asciinema-player/issues/79 https://github.com/asciinema/asciinema-player/issues/79
- sdan 7y agoNot only do I think this is cool and would use, but I also love the simple landing page. Pictures illustrating exactly what it does, something many people/organizations cough oxide.computer cough don't do properly.
- pure-awesome 7y agoYeah, love this! I hate when I can't figure out what a software or service does from their homepage. Looking at oxide.computer... man... what DO they do? Do they sell servers? My other pet peeve for these kind of websites is when the landing page is full of just release notes and links to tangentially related articles news articles and talks about the product, and it takes me 10 minutes to figure out where I can actually read about what the heck product I'm even looking at, and why I would use it over other products in its class. This XKCD about uni websites gives the general gist of what I'm talking about https://xkcd.com/773/ https://xkcd.com/773/ Some Github repos are also awful. The README should summarize what the product is or link to a website that does. The Kotlin and Elm websites are pretty good: https://kotlinlang.org/ https://kotlinlang.org/ https://elm-lang.org/ https://elm-lang.org/ It's hard to find some really terrible ones right now... Apache products tend to take some effort to decipher what it is they even do or how they'd be used. They have a nice summary description like the start of a man page, but that's about it. https://ant.apache.org/ https://ant.apache.org/ https://hadoop.apache.org/ https://hadoop.apache.org/ The GitHub landing page is surprisingly worse than you'd expect. It's not terrible... but check it out in Incognito / Private Window and imagine you'd never heard of GitHub: https://github.com/ https://github.com/ Compare the above, with how cleanly and clearly Travis-CI manages to express what it does, and why you would use them, along with a useful screenshot of what the UI looks like right near the top of the page, so you can get an idea of what it would be like to use in practice: https://travis-ci.org/ https://travis-ci.org/
- bbx 7y agoI was thinking the exact same thing. I'm not the most technical person but I could easily understand the purpose of the program by quickly scanning the webpage. The combo "clear headline + demo screenshot" is all that's required to explain what the product features are, and how I, as a user, can benefit from this product. There is even a blob of text available under each screenshot, for those who want to know a little bit more. (Reminds of "The obvious, the easy, and the possible" [1]) A lot of landing pages of SaaS products and other tech-related websites could benefit a lot from this "old" but straightforward approach, instead of trying to sell you a better lifestyle with "Be productive" or "Break free" or "Solve all your issues" marketing headlines. [1]: https://signalvnoise.com/posts/3047-the-obvious-the-easy-and-the-possible https://signalvnoise.com/posts/3047-the-obvious-the-easy-and...
- deleted 7y ago[deleted]
- fastbeef 7y agoMan, I must be getting old, because more and more often something like this pops up and it strikes me that this has been done before. In this case, I was flying through the file system like nobodies business in 1991 with Norton Commander[0] [0]https://en.wikipedia.org/wiki/Norton_Commander https://en.wikipedia.org/wiki/Norton_Commander
- dystroy 7y agoDid Norton Commander trim the tree in order to show a deeper overview ? I don't think it did (or I don't remember that feature).
- smartmic 7y agoProbably the trim feature is a key differentiator. I am happy with nnn [1] so far but it really looks interesting. [1] https://github.com/jarun/nnn https://github.com/jarun/nnn
- TuringTest 7y agoThere's a significant underlying principle there. Commom UI widgets are not prepared to deal with collections of widely varying sizes. The two-pane file browser (folder tree plus folder contents like Windows 95 Explorer, or two parallel panes like Norton Commander) was a compromise solution that has worked for decades. But this idea of showing in context a limited view of representative items of each collection could be generalized and exploited in other generic data-heavy interfaces, where there's no business code to show the specific data loads in the best way.
- flir 7y agoIt's the zero/one/infinity rule. Programmers don't even know what it's called, they just absorb it by osmosis. But in the real world there are so many lists that will never have more than 20 items.
- 7y ago
- jhidding 7y agoWould also be cool as a Vim plugin!
- skykooler 7y agoIndeed! I'd love to have some way to use broot instead of NERDTree.
- seren 7y agoJust a quick remark but for a simple command line utility, I really like a static binary you only need to download, drop into a directory in the path. I am always wary of tools that need to install either a python or node.js distribution, because this seems unnecessary bloat, and might mess with local install if you are not careful.
- dystroy 7y agoYou can download binaries from there: https://dystroy.org/broot/documentation/installation/ https://dystroy.org/broot/documentation/installation/
- JosephHatfield 7y agoStrange that Chrome doesn't appear to trust broot.exe. When that binary is downloaded, the downloaded file message is: broot.exe is not commonly downloaded and may be dangerous.
- nkrisc 7y agoWell the first part of the message is almost certainly true and likely what is triggering the message.
- leeman2016 7y agoIn addition to Chrome, Windows 10 seems to be suspicious too ... I don't know why though.
- progval 7y agoBut they only work with a subset of architectures (only x86_64 in this case) and a subset of OSs (Windows with GNU installed, Linux with GNU libraries including libc and libgcc)
- swiley 7y ago>Linux with GNU That’s why he said static, although I’m not sure gcc will produce totally static binaries anymore.
- unishark 7y ago/I/am/Broot -- I am Broot -- I am Broot -- I am Broot
- TheCabin 7y agoReally cool! I sometimes find it amazing that we do computer science for decades now, but there is still a lot of room to improve very basic things.
- avaku 7y agoI miss my Far Manager, working on Linux now... Just remembering how quickly I was doing stuff in directory structure, people couldn't even follow with their eyes...
- vetinari 7y agoInstall mc (midnight commander). It is slightly different, in some ways better, in some ways worse.
- fraktl 7y agoI'm one of those skeptic people who always criticize just because I'm a negative person. However... I LOVE THIS PROGRAM! I really, really, really love it! I don't care if it's been done before. I don't care if <insert name here> exists and does a similar thing. Awesome because: - short name (br in terminal, I'll remember that instantly) - easy installation - web page is awesome and shows you instantly how to best use this program - help page in the program itself is awesome, clear and easy to navigate - defaults are sensible and totally easy to get used to - broot just WORKS! and it works well, I finally got rid of all the aliases around ls that I used in order to get info I want Amazing job Denys, 10/10 for the web, program, documentation and examples! Btw. Linux/Windows user here.
- dystroy 7y agoWow. Thank you. As an open-source author it really helps to get this kind of comments.
- fraktl 7y agoOpen source authors should be getting more "thank you" messages rather than constant barrage of issues and complaints :) Have an excellent day and successful year!
- mrec 7y agoIt never occurred to me before, but it'd be great for GitHub et al to have a way to leave kudos and thank-you notes. As things stand, the only affordances are for leaving issues and complaints, so it's not surprising that that's what get left.
- shepmaster 7y agoI’ve seen and used issues as “thank yous”. As a developer, I don’t mind this misuse of the issues :-)
- 7y ago
- archivist1 7y agoWe are broot
- j88439h84 7y agoRanger is another good option for navigating directories. https://ranger.github.io/ https://ranger.github.io/
- scoopr 7y agoIs it something I'm not understanding or a bug, but alt-enter does the same thing as plain enter? (macos, zsh, iterm2, fi-locale. Installed through cargo, the executable installed the br thing)
- dystroy 7y agoIt's not supposed to do the same thing. alt-enter closes vim: * on a file it opens the file (in the same terminal if possible, depending on the system file opening) * on a directory it does a cd to that directory and comes back to the terminal (if broot was launched with the br command) I'd like Mac users to chime in and answer you now: I can't really test on mac.
- adriang133 7y agoAlt-Enter, or more specifically Option-Enter doesn't work on macOS. It does the same thing as Enter, as pointed out above. Good job btw, Broot looks awesome!
- dystroy 7y agoOK so we'll have to define another shortcut (which should already be doable with simple configuration).
- dancek 7y agoNo need to. The Option key is configurable in terminal software.
- benjaminwai 7y agoHow about a ctrl-g shortcut to cd and exit to the directory on the file/dir highlighted? EDIT: Found https://dystroy.org/broot/documentation/configuration/ https://dystroy.org/broot/documentation/configuration/ and on macOS the config file is located at ~/Library/Preferences/org.dystroy.broot/conf.toml
- friend-monoid 7y agoI like it! It's a bit too slow on my machine, but I really have too many files, I need to clean up some of the crap I have lying around.
- Multrex 7y agoHow to install on CentOS?
- SAI_Peregrinus 7y agohttps://dystroy.org/broot/documentation/installation/ https://dystroy.org/broot/documentation/installation/ How I did it (though not using CentOS, should be identical): Install rustup from https://rustup.rs/ https://rustup.rs/ (download & run the shell script). Then `cargo install broot` to download and and install this. Then run `broot`, and restart the shell. After that it can be invoked via the `br` command.
- spurgu 7y agoOoh nice, like ls, tree and du/ncdu wrapped into one.
- baq 7y agotested with mosh with black-on-white color scheme and it doesn't play nicely with that combo - text it prints is color-on-black; i'd rather have it redraw the whole terminal or (better) keep to the terminal color scheme
- dystroy 7y agoThe skin is customizable. There's one that I propose for black-on-white: https://dystroy.org/broot/documentation/configuration/#white-background-skin https://dystroy.org/broot/documentation/configuration/#white... and I guess people more used to black-and-white could submit a better one
- baq 7y agothanks for thinking about that! do you think there's a way to identify that the terminal is black-on-white and use something like that by default? i don't really care that much about specifics as long as it can pick one automatically depending on terminal settings.
- dystroy 7y agoIt should be possible. I'll open an issue for that. edit: https://github.com/Canop/broot/issues/87 https://github.com/Canop/broot/issues/87
- fphilipe 7y agoThis looks great! Only dealbreaker for me unfortunately is that it forces me to use up/down arrows, i.e. leave the home row. I use ctrl+p/n everywhere (or ctrl+j/k in some tools), be it in the terminal or on macOS.
- dystroy 7y agoYou can use ctrl-p and ctrl-n. You wouldn't be the first one : https://github.com/Canop/broot/issues/24#issuecomment-572481660 https://github.com/Canop/broot/issues/24#issuecomment-572481...
- abjKT26nO8 7y agoJudging from the landing page, it seems to be a file manager and not an alternative to tree(1). If so, another one that's also handy and shows you a preview of the files one level up and down the directory tree is ranger(1) --- and it has vim keys which makes it extra great.
- istjohn 7y agoYeah, I just discovered ranger a couple weeks ago. I'm going to see how this compares.
- rcshubhadeep 7y agoGreat work! Thanks a lot. Can we get somekind of "brew" integration for Mac users as well please?
- dystroy 7y agoThere's a brew formula, yes. You can do `brew install broot`. I've been told that the bash file path I use on mac is wrong though: https://github.com/Canop/broot/issues/84 https://github.com/Canop/broot/issues/84
- frereubu 7y agoIn the meantime you can just add this line to the bottom of .bash_profile after installation: source /Users/username/Library/Preferences/org.dystroy.broot/launcher/bash/br Obviously replacing username with your username...
- cyrusmg 7y agoIf `echo $USER` works on MacOS, everybody can do `source /Users/$USER/Library/Preferences/org.dystroy.broot/launcher/bash/br`
- greentrust 7y agoDoes your release process include publishing to brew? I ask because brew only has 0.10.3, whereas crates and github show something a few versions ahead (0.11.3). Looks awesome!
- dystroy 7y agoNo, I unfortunately doesn't maintain myself the brew formulas, I don't even know how those things work (I'm not a mac user).
- deleted 7y ago[deleted]
- luladjiev 7y agoThat's one really nice tool. Great job.
- Emptysister 7y agoWow! loving it after using it for the first 5 minutes! thank you
- stevendgarcia 7y agoLoving everything about this. You really knocked it out the park. It's so much more ergonomic than cd + ls (which feels like a caveman solution by comparison) Congrats on bringing directory navigation into the 21st Century. I have installed it on all my servers and I will use it forever. Long live Broot!
- bnegreve 7y agoI don't think interactive tools such as broot are meant to replace standard shell commands. Interactive tools are more user-friendly, but classical shell commands are easier to script and pipe together.
- stinos 7y agoDon't want to downplay broot, but fzf has been around for a while and when I first discovered it I had the exact same idea 'YEAH finally directory/file navigation for the 21st century' :) Mainly because of the fuzzy matching, and because of the ways to extend it and because it works on most platforms. Possibly there were already predecessors though, not sure.
- pdimitar 7y agoAnother poster mentioned https://github.com/lotabout/skim https://github.com/lotabout/skim but I haven't compared it to fzf yet.
- vermaden 7y agoI really liked broot after using it for several minutes. One of the downsides is that it calculates the space everytime with -s option which makes it slow in that mode. If you seek for really fast tool for that purpose then try ncdu which calculates the sizes only once at start then then does that only on your request by pressing the 'r' key. Here is how ncdu looks like: https://linuxundich.de/wp-content/uploads/2014/12/ncdu-linux1.png https://linuxundich.de/wp-content/uploads/2014/12/ncdu-linux...
- dystroy 7y agoThe sizes are cached so they should not be recomputed (if you don't hit F5 or don't do any change (like rm, cp, etc.) from broot.
- pdimitar 7y agoIf you look for dedicated separate tools that calculate directory sizes then those two (also Rust tools) can help: 1. `cargo install dirstat-rs` (binary is `ds`): Prints several lines showing the size of the directory and the top fattest children. Colored output. 2. `cargo install dua-cli` (binary is `dua`): Only prints one line with the specified directory size. Colored output. Both are insanely fast (they use all CPU cores). Love them both.
- vermaden 7y agoThank you, will look into them.
- ausjke 7y agotried it, pretty neat like other useful rust tools: bat, rg, fd, etc. For this one compared to ranger, here is what I feel to make broot even better. 1. support vim keybindings 2. support editing text files inside the terminal as ranger does with a quick try i still feel ranger is better, if I missed something that broot has advantages over ranger please let me know.
- capdeck 7y ago> 2. support editing text files inside the terminal as ranger does Can it be configured to just open file in vim or other eidtor? May be in a subshell, so you can return back to broot. Why reinvent the wheel...
- ausjke 7y agoranger uses vi directly inside the terminal, when you quit vi you are back to ranger in the same terminal. ranger is also .git aware. on the other hand, grep/find GNU tools all should be upgraded to ignore .git/node_modules/pip-site-packages by default, and honor .gitignore,etc.
- adwf 7y agoThis is really great! Two things that could do with improvement: - The backspace key quits the program. I've accidentally quit so many times after deleting my filter by holding the key down. - The filter seems quite quick at first, but when I add a period it slows down massively. ie. Search for "xorg", then "xorg.conf", the moment you type the period it hangs for a good few seconds, even though it's in the top level of my home folder. A breadth first search should find it trivially, so I'm assuming it's some quirk of the fuzzy matching.
- pdimitar 7y agoThe dot is likely treated as an "any character" in a regex type of way.
- gulabjamuns 7y agoOn Mac OS, Enter invokes Xcode. How to get it to use vim for text files.
- dddddaviddddd 7y agoProbably it's using the default file handler, i.e. whatever would open the file if double-clicked in the Finder.
- dystroy 7y agoBy default the standard file opening provided by the system is used but you can override it: https://dystroy.org/broot/documentation/tricks/#open-files-without-a-windowing-system https://dystroy.org/broot/documentation/tricks/#open-files-w...
- growt 7y agoCan I match directories and file names at the same time? "frontendaction" will match "frontendaction.txt" but not "frontend/action.txt" "frontend/action" will turn the search into a regular expression and complain
- dystroy 7y agoThere's currently no search on paths, only on filenames.
- moralsupply 7y agoIs there a way to make Broot respect the terminal theme's colors? If I have a light theme running, br doesn't care and uses a dark background, and when I run it with --sizes half of the screen has a dark background and the other half is light.
- dystroy 7y agoYou can't just respect the terminal colors because the colors you add wouldn't be readable. Right now the best option is to define the skin in the config file (see https://dystroy.org/broot/documentation/configuration/#white-background-skin https://dystroy.org/broot/documentation/configuration/#white...) and I've added a new issue requesting that broot detects if a white skin seems more suitable.
- moralsupply 7y agoCheers! Awesome tool btw
- JdeBP 7y ago"respect the terminal theme's colours" generally decodes to "use indexed colour and just the 16 AIXTerm colour indexes", note.
- piahoo 7y agono support for fish shell?
- SAI_Peregrinus 7y agoWorks for me. The "Installation" page includes the phrase " (supported shells today are bash, zsh and fish)," for it in the section on the shell function.
- samatman 7y ago+1; the documentation says fish is supported, but the shell command fails with "I found neither .bashrc nor .zshrc." Also: might want to fall back to .profile if .bashrc isn't found...
- dystroy 7y agoThere's one but there was a problem for fish on mac until a few minutes ago... (I made a new release)
- samatman 7y agoworks for me now, thanks!
- makach 7y agoThis is great. "brew install broot" worked lovely on my mac
- rantu 7y agohttps://youtu.be/ahjcPtQ4MDA https://youtu.be/ahjcPtQ4MDA
- nizmow 7y agoI love it, but it's REALLY slow in Windows on the new MS Terminal, which is typically actually quite fast. Noticeably laggy and I can see the screen redraws. Anyone have any idea why, or how to speed it up?
- galacticdessert 7y agoI also noticed some slowness on Windows, especially in the fuzzy search. Will test later on my private Linux machine for comparison. Overall though, great tool!
- JdeBP 7y agoIn the 1980s, full-screen TUI programs did significant work to optimize terminal output. A complete redraw of an 80 by 24 screen at 300 BPS was not quick. So applications normally only wrote changes to the screen, only performing a full redraw when requested by a Control-L input (or some such). Terminals have sped up, but the amount of terminal I/O to draw a screen has increased, too. Nowadays there are lengthy SGR 38/48 sequences for 24-bit RGB, plus the other SGR sequences for attributes, plus of course characters that are now commonly multi-byte UTF-8 encodings, including box drawing characters. So the old considerations of optimizing terminal output still apply nowadays to full-screen TUI applications. Optimize out cursor motions that move to where the cursor currently is; replace absolute motions to nearby positions by shorter relative motion control sequences; optimize out superfluous attribute and colour changes; replace onwards horizontal cursor motions by just rewriting the relevant characters; skip unchanged cells; and so forth. * https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47710f355c5c0417a/source/TUIOutputBase.cpp#L143 https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47... The Rust full-screen TUI code in Broot (and common Rust libraries) does not do any of this. * https://github.com/Canop/broot/blob/d8ba179946ad10d777f93b4a280f00462a27d393/src/displayable_tree.rs#L181 https://github.com/Canop/broot/blob/d8ba179946ad10d777f93b4a... * https://github.com/crossterm-rs/crossterm/blob/41ff73e3d376382dd102ddea42d9dabb20910a27/src/cursor.rs#L62 https://github.com/crossterm-rs/crossterm/blob/41ff73e3d3763... When it is a Win32 application, it uses console I/O and this does not matter quite as much, although it's still a waste of system call context switches to overwrite a console screen buffer with what is already there. But when it is using terminal I/O this matters significantly. The Rust terminal handling is actually fairly poor overall. This list, for example, is in reality a lot longer. The terminfo database records a lot more terminal types that understand these escape sequences. "putty" for one egregiously missing example. * https://github.com/crossterm-rs/crossterm/blob/41ff73e3d376382dd102ddea42d9dabb20910a27/src/ansi_support.rs#L60 https://github.com/crossterm-rs/crossterm/blob/41ff73e3d3763... * https://invisible-island.net/ncurses/terminfo.ti.html#tic-putty https://invisible-island.net/ncurses/terminfo.ti.html#tic-pu... Personally, rather than treat lack of capability as the norm with a paltry list of exceptions, I prefer the opposite assumption that (except for "dumb") the world has nowadays reached 1976 capability levels. (-: * https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47710f355c5c0417a/source/TerminalCapabilities.cpp#L54 https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47...
- gulabjamuns 7y agoOn Mac OS, is there a way so that Enter opens a text file using vim and not xcode.
- dystroy 7y agoIf it's only for text files, you should configure the system opening. If it's for any kind of file, then you can override the Enter: https://dystroy.org/broot/documentation/tricks/#open-files-without-a-windowing-system https://dystroy.org/broot/documentation/tricks/#open-files-w... More usually you define a few shortcuts for your specific needs : https://dystroy.org/broot/documentation/configuration/#verbs-shortcuts-and-keys https://dystroy.org/broot/documentation/configuration/#verbs...
- gulabjamuns 7y agoI get: Bad configuration: not a valid key: enter When I put enter as a key in place of F2.
- breytex 7y agoLove it. Thanks for sharing. But I found one issue which might be a critical one: When you start broot with "br --sizes", it shows you all the folder sizes. The tree than takes a while to render all the different files and folders, since they probably have to be recursively evaluated in size. However, when you select a specific file, press space and then `rm` to delete it, the pointer might change to another file randomly. This is because the file list is still not rendered-out because of the file sizes beeing calculated, however, the pointer to the selected file should be persistant or you might accidentaly delete an important file.
- dystroy 7y agoThere's an issue for that (it's a few hours old). This is a top priority and should be fixed before next week.
- xwowsersx 7y agoJust installed, this is awesome. What is alt-enter on Mac OS? How do I use this to CD into the directory I selected?
- xwowsersx 7y agoI can do :cd but is there a way to make alt-enter work?
- djsumdog 7y agoHmm .. I wish there was an IRC or Gitter chat. If I try to select some files with a regex like /SomeTVSeries(.*)mkv .. it selects everything, but then a space mv and new path only moved the currently selected directory or file. There is a section in the help about using verbs on a selection, but nothing to indicate how to turn a regex search into a multiple file selection (can't tell if this is supported or not) ... I guess if it's not it would be a neat thing to see if I could add. Edit: there is a chat room! https://miaou.dystroy.org/3490?broot https://miaou.dystroy.org/3490?broot
- Sammi 7y agoI had this immediate assumption that this was implemented in Rust when I saw the landing page. Didn't know for sure until I checked Github, but lo and behold it was which I think is funny. I sense a trend where new and interesting projects are usually implemented in Rust.
- kvark 7y agoWas reading and thinking "oh boy this looks so good, I wish it was written in Rust..." and then reached the "Installation Instructions" just to see "cargo install broot". HERE WE GO
- drkstr 7y agoIs cargo known for build problems? I've never used it before now and I took a shot in the dark with `sudo apt install cargo`, then `cargo install broot` went off without a hitch. I just had to add ~/.cargo/bin to PATH and I was good to go. This was in WSL no less. Is this experience atypical? I've actually been running through the getting started guide for rust-lang as it left a positive impression on me. Something like this in C land seems unachievable.
- narimiran 7y ago> Was reading and thinking "oh boy this looks so good, I wish it was written in Rust..." Can I ask... why? What is the difference between a program that makes you feel "oh boy this looks so good" written is some XY language, and the same program with the same functionality written in Rust?
- getsauce 7y agoWas anyone able to make this work in WSL? I can run the broot binary if I specify the path to it, but even after running the install script, trying to use br doesn't work.
- nicpottier 7y agoLooks pretty neat. Would REALLY like CTRL-P and CTRL-N to work for up/down as is standard in OS X / most linux systems.
- dystroy 7y agoYou can very easily configure broot : https://github.com/Canop/broot/issues/24#issuecomment-572481660 https://github.com/Canop/broot/issues/24#issuecomment-572481...
- aiisjustanif 7y agoI'm surprised no one has brought up the weight of the node modules on the system in the last section on their site, "See what takes space:" It's quite beefy for such a tool.
- ojosilva 7y agoI wish the Github UI had an user experience like this. I do a lot of directory tree navigation in the GH interface these days, while searching for algorithms and examples for a new project and it's horrible how much time I'm wasting on clicking into and stepping back out of folders trying to get a glimpse of whats in them. The lack of file sizes and filetype icons make it even worse. GH file navigation feels like a step back from where we already were in 1986 with Norton Commander.
- gringoDan 7y agoWhile not exactly the solution you're looking for, I've found that Octotree is a useful tool for navigating GitHub: https://github.com/ovity/octotree https://github.com/ovity/octotree
- galacticdessert 7y ago+1. Would be nice to have something similar for gitlab as well.
- Jarred 7y agoYou might already know about this, but try pressing T.
- almindor 7y agoReally cool. For some reason when I opened the webpage I was like "this seems like it's written in Rust" and it is! I'm using Rust as my main language for the past 6 months now so it makes me happy :D
- mpawelski 7y agoLooks like really cool and useful project. Is it usable on Windows though? I can't press Shift key to enter ":" for commands. Seems like a dealbreaker. I tested it on WSL and Ubuntu on VM and Shift works there. Anyway. This look super cool. I'm a Windows guy but have been using terminal more lately with tools like https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep https://github.com/sharkdp/bat https://github.com/sharkdp/bat https://github.com/sharkdp/fd https://github.com/sharkdp/fd and they work great on Windows (plus are easily installable by https://scoop.sh/ https://scoop.sh/). Hope the Windows story will improve for Broot to. Some suggestions after very quick look (except not working Shift key on Windows). * Screen refreshing and general experience is really slow. Hold arrow key for couple of seconds and see that refreshing can't catch up. The best performance is on standard windows cmd, a bit worse on new "Windows Terminal (Preview)", absolutely horrible on ConEmu (which I use daily :-( ) * I sort of expected that I can "scroll" current directory but I get "400 unlisted" text at the bottom. It makes sense for nested directories and looks like main feature of Broot. But for _current directory_ it would be great if it didn't "trim" entries at the end and you could just use standard arrows keys, PageUp/PageDown and Home/End to quickly glance and see what files are available when I don't know what file names I'm looking for. And when I would want to do the same for some nested directory I would just select it with Enter. So basically it would be great if Broot was more like https://github.com/junegunn/fzf https://github.com/junegunn/fzf but not just for flat list of files.
- pdimitar 7y agoI learned about bat and fd from you and had no clue before, thank you!
- cliqueiq 7y agoyou can just vim into a dir and get a collapsible tree. i don't see any reason to invent yet another tool for something tree -f | grep foo can do. More supply chain hell, more useless tooling, more bloat IMO, prob for some junior dev's "portfolio"/"resume".
- santa_boy 7y agoThis looks good and I can understand the use case. Pretty neat! Just for those who don't want to learn more ... you can get a lot of similar utility experience using: `tmux` (for panes with mouse support) and `fish` (for autocomplete) I prefer to handle lot of the additional function over `ls` or `tree` that is offered by `broot` in separate panes. I just feel it is more manageable and interactive with a lot of flexibility.
- notyourword 7y agoSome complaints: * It is 10 times bigger than my text editor * It changes the color scheme of my terminal * It installed a function to my shell rc file after I selected "no, I don't want that"
- wakkaflokka 7y agoI really love this. First thing I tried to do was use vim keybindings though... that would make this absolutely stellar.
- quacker 7y agoYou can open directories in Vim, with netrw which is usually there by default: https://shapeshed.com/vim-netrw/#netrw---the-unloved-directory-browser https://shapeshed.com/vim-netrw/#netrw---the-unloved-directo...
- frequentnapper 7y agothanks to this i looked at Rust again. Going over the Rust book: https://doc.rust-lang.org/stable/book/ https://doc.rust-lang.org/stable/book/. The concepts of ownership and borrowing made instant sense whereas before I had ignored Rust after hearing that it was way too complex. I think I just might take it up as a hobby.
- acd 7y agoBrilliant idea to fold files.
- meonico 7y agoIn order to install this you'll need 200mb rust + 100mb in .cargo dir it will drag along and then wait like 3m until it compiles this, jesus christ cli app.
- meonico 7y agoIt doesn't do anything special that ranger cannot, well search is nice indeed but that's it. No vi shortcuts btw.
- roryokane 7y agoIf anyone is wondering what ranger is, it’s “a console file manager with VI key bindings” whose home page is https://ranger.github.io/ https://ranger.github.io/.
- monkeydust 7y agoSo i installed on windows 10 - can run it from the directory via broot but not br nor anything added to PATH. I am doing something wrong here?
- dhshahsndeisjwn 7y agoThis is amazing. The only problem is I now want all these features within the OS X file open dialog for opening saving files within applications.
- mam2 7y agoSuper nice. Here's an issue: why when you search the cursor is not the first in the line ? it makes no sense when you make enter when you already know the path and want to go fast
- 7532yahoogmail 7y agoFor some at the office midnight commander still rocks their world....
- elwell 7y agoAnti-GUI developers can now get the benefits of GUI visualization while still being cool enough to stay in the terminal. See also: dired-subtree for Emacs: https://www.youtube.com/watch?v=z26b8HKFsNE https://www.youtube.com/watch?v=z26b8HKFsNE