3 ms·
What i really want is a `mkdir --cd` - annoying to code without shadowing real mkdir though.
by akdor1154 1y ago
What i really want is a `mkdir --cd` - annoying to code without shadowing real mkdir though.
- ramon156 1y agoit's weird how most IDE's already figured out people want this. I can type in "New File" > "/foo/bar/baz" and it will work just fine. Is there any limitation as to why mkdir can't support recursive generation?
- dannyfritz07 1y agomkdir -p https://www.man7.org/linux/man-pages/man1/mkdir.1.html https://www.man7.org/linux/man-pages/man1/mkdir.1.html
- johnisgood 1y agoI'm surprised people do not know about this. Maybe that is why they love these CLI tools written by Rust. ;) Learn your basic UNIX/POSIX utilities first, please, before you start preaching because of Rust. :D
- metaltyphoon 1y ago> Learn your basic UNIX/POSIX utilities first, please, before you start preaching because of Rust. :D Maybe, jus maybe the defaults for UNIX/POSIX was just not good and thats why they Rust based one?
- johnisgood 1y agoMaybe, just maybe I could fork "mkdir" just for you and make "-p" the default, in C? Or maybe, just maybe you could make an alias for it, i.e. "alias mkdir="mkdir -p" so then it becomes the default? sighs.
- skydhash 1y agoThat is why I’m mostly using default tools. I like the idea of these tools, but autocomplete and fuzzy finding takes in aggregate more time than if I took a step back and actually configure my tools (shell alias and scripts, ssh config, git alias,…). My current list of tools I install are: - ripgrep. It’s just fast. - fzf. For vim. I’ve never have a real use for it on the command. - lf. Sometimes I want to quickly browse around a directory. But more often than not, the core utilities work fine.
- johnisgood 1y agoI use ripgrep and fzf as well. I have never heard of the last one. But yeah, personally I just configure the default tools and be done with it for almost life. :D
- deleted 1y ago[deleted]
- linsomniac 1y agoI have a shell function "md" that does a "mkdir -p" and then cds into it. In fish: function md if test -z "$argv" echo "md: Must supply an argument: The directory to create+cd into" return 1 end mkdir -p "$argv" cd "$argv" end
- quesera 1y agoThis works in sh, bash, zsh, etc: mkdircd() { mkdir -p "$1" && cd "$1" } mkdircd /tmp/new/directory/at/arbitrary/depth