Implement 'mkdir' command
Ranger has a 'mkdir' command which simply makes a directory with a given name in the current directory, I use this a ton, And would love to have this implemented in lf.
How about
cmd mkdir %{{
printf "Make directory: "
read ans
mkdir $ans
}}
map md mkdir
in the config?
See also https://github.com/gokcehan/lf/wiki/Tips#commandmapping-to-create-new-directories
I agree that we should have a native mkdir command in lf and probably also a touch command. Not expect the user to set it manually in their config, so whenever someone installs lf, those commands will always be available everywhere, like in ranger.
Agreed.
How about
cmd mkdir %{{ printf "Make directory: " read ans mkdir $ans }} map md mkdirin the config?
This works, but doesn't work the same way as in ranger (Taking the dir name as an argument instead of prompting for it) and is a temporary solution at best.
See also https://github.com/gokcehan/lf/wiki/Tips#commandmapping-to-create-new-directories
The solution here works properly, Would be nice to see it implemented either by default, or as a built in command.
Hey! I decided to implement this, here's the pull request if you're interested in reading it: https://github.com/gokcehan/lf/pull/1179
If the stance on this is to just rely on the shell for these commands, how about adding default shell commands?
So a new user who is used to ranger can download lf and right away commands like :mkdir and :touch are available, but instead of a native Go command, they use the shell. I assume 99% of all lf users who has a mkdir command in their config use an identical implementation.