Skip to content

Instantly share code, notes, and snippets.

@udiNur
udiNur / open tmux pane in current directory of ncdu.txt
Last active May 2, 2020 19:42
open tmux pane in current directory of ncdu
ncdu is the best terminal based disk space analyzer that I know.
when you browsing using ncdu and you want to something in the current directory, you can open a terminal in the correct directory by pressing "b".
the terminal will be opened instead of ncdu, so there are few annoying downsides for it:
1. you aren't able to continue browsing only after you will be done with the terminal.
2. you can't save directory location for handling later (moving files from there to another location and so...)
3. you can't see the directory from the "ncdu" eyes, files from the larger to the smaller and so.
so like a programmer that uses a LOT with tmux, I came with the idea of open tmux-pane in the current window (in the location that you are in ncdu obviously)
I make one-liner that after you will add it to .bashrc/.bash_profile, you will get a new pane of tmux below the "ncdu" pane by pressing "b"