Feature: Expand, modify, and create nested directories (original) (raw)

This is closely related to #3 but slightly different.

Sometimes I would like to be able to use Dirbuf to easily move a bunch of files from a subdirectory to my current directory. Ideally I'd like to do this by just expanding the subdirectory within my current dirbuf, deleting the leading path, and saving to move all the files I changed into my current directory.

I want it to feel like folding, where you're just "unfolding" a directory to expand it and folding it to close it. I want to be able to expand a directory, move some files to my current directory, and close the directory and have all the files I didn't move get hidden again and all the files I moved to stay. Ideally it should just work how you think it does.

For a concrete example in pseudo-dirbuf, consider you're in a directory containing only the directory foo/ which itself contains bar and baz. You open the directory and see

You "unfold" foo/ and see

#1 foo/
#2 foo/bar
#3 foo/baz

Then you make the following edit

#1 foo/
#2 bar
#3 foo/baz

Then you close foo to get

Upon saving, this should result in the syncing plan being mv 'foo/bar' 'bar'.

Open Questions