5 ms·
Show HN: A single command terminal configuration installer
- nickthemagicman 8y agoNot a noob but book marking for the cool library ideas.
- transfire 8y agoHas anyone else tried it?
- jamescostian 8y agoTL;DR: someone's dotfiles. Neovim, tmux, and Oh My Zsh.
- LyndsySimon 8y agoPretty much, this. My own dotfiles are installable with only a couple of commands - I just clone the repo and run a simple shell script that symlinks some things to a central location. The only thing that isn't included is the installation of binary dependencies (like neovim and its plugins), but that differs between OSes and didn't seem worthwhile to automate.
- h1d 8y agoAt least it's authored for new users to get started easily than a random guys dotfile git repo...
- collinf 8y agoWhile it looks great, for a real noob the real problem (at least when I was starting out this was mine) is fast terminal navigation. To learn to do that I always thought the normal progression is sort of like this: 1. Mastering getting around terminal with slight configuration (bash, zsh, random dotfiles, maybe a plugin manager) 2. Getting used to editing files in the terminal (Vim) 3. Managing multiple terminals at once (tmux) Managing all of those changes at once kind of overloads you where it slows you down to much to really consider this a practical change at one once. You have just about the same exact set up that I do as well barring a few minor differences, Nord theme included, which is pretty funny that they converged like that.
- yumaikas 8y agoI've found that using a bookmarking system helps cut down the use of cd a lot. That's the latest addition I've made to my terminal setup, and it's helped a lot.
- obel1x 8y agosounds useful. i cd often. can you expand on your bookmarking system?
- yumaikas 8y agoOne better, I can link you to it (I had written my own version at work, but ran across this and forked it to switch out the command names, since someone else had done it alreay) https://github.com/yumaikas/bashmarks/blob/customized/README.md https://github.com/yumaikas/bashmarks/blob/customized/README...
- Spivak 8y agoDevelopers will be doomed to reinvent bookmarking systems when all you really need to do is set CDPATH Here's how to do it in ZSH: https://robots.thoughtbot.com/cding-to-frequently-used-directories-in-zsh https://robots.thoughtbot.com/cding-to-frequently-used-direc...
- DavideNL 8y agoAs an alternative, there's also fasd: https://github.com/clvv/fasd https://github.com/clvv/fasd
- rasengan 8y agoI think this is good. At the end of the day, the best environment imho for building efficiently is the terminal, but it's slowly becoming a lost art. :/
- oftenwrong 8y agoThe last thing an inexperienced terminal user should be doing is installing a bunch of software without understanding how it fits together, how it is used, or how it is actually configured. If you want to understand your terminal stack, build it; don't have it built for you. The better approach is to start from a basic setup. For example, with vim, don't use vim-sensible right off the bat. Instead, just use vim. If a need arises, research what you can set up to address it. If you are curious about what is out there, read through the source of plugins like vim-sensible, taking each option, reading the docs for it, learning a bit of vimscript as needed, and only adding stuff to your vimrc if you really understand what you are adding. Don't add a bunch of things all at once. Do one at a time, and try it out for a while.
- aaronkjones 8y agoMy thinking is it's easier to start out with a solid foundation that I think the "sensible" and oh-my-zsh projects give you. Take tmux-sensible for example, https://github.com/tmux-plugins/tmux-sensible https://github.com/tmux-plugins/tmux-sensible. Each configuration item is explained in detail. So the goal here is to give new users a starting point that is well documented and explained, instead of finding joeschmo's dotfiles that has "set -g default-command "reattach-to-user-namespace -l $SHELL"" with no explanation on what that does.
- kungtotte 8y agoI think vim-sensible is much less of an issue than oh-my-zsh. Sensible isn't a whole mess of scripts and settings. It's 100 lines of highly readable vim settings and at the top there's a comment instructing people to use :help to learn more about what everything does. I guess a case could be made for adding descriptive comments to make it more approachable for beginners, but it's not some black box of magic.
- zimbatm 8y agoLearning everything from scratch is a big ask not everybody is willing to jump for. Some users might feel intimidated by the amount of things to learn before they can become productive. If that gets new users in, make them comfortable until they outgrow the setup then it's a good thing.
- sudofail 8y agoThis looks really well done. I've been meaning to do this for some time. While I agree it's best to learn to properly configure your tools, this can be a good first step for newbies. The problem I run into with sharing dotfiles is that my dotfiles aren't what someone who's new should be using. They need sane defaults that they can build upon, not the mess that my dotfiles have become over 10 years. This seems to be a good solution to that problem; giving some nice basics to set a newbie on the right track. Really well done.
- aaronkjones 8y agoThank you. You summed up precisely my thinking. I think the “sensible” projects lay a foundation people can learn on. I just wrapped them up into a single package.
- forgotpwd16 8y agoIs `sh -c "$(wget $link -O -)"` supposed to be better than `wget $link -O - | sh`?
- tomsmeding 8y agoIt's still executing code right from the internet without any checking. What it does fix is one of the ways in which a server can tell that a script is being executed and not just downloaded for reading: when piping, the download stalls while the shell is slugging through the script, but when it's done in a shell escape as here, it's downloaded in one go. So theoretically, you have less chance of reading something different (when inspecting the source) than what the shell is going to execute. However, the script can't be overly long this way, since there is a limit to the command line length on Linux. Safe, however, this is clearly still not.
- aaronkjones 8y agoBy safe do you mean there is something insecure with redirecting output in this manner or do you mean one shouldn’t sh -c $(wget... without first checking the source of what they’re downloading?
- aaronkjones 8y ago*By unsafe
- tomsmeding 8y agoMostly the second, you should check what you're downloading and executing. But a server can send two different files on two similar requests, ans perhaps it sends you a "good" file when you view it in your browser and a malicious file when downloading it via wget. When piping, there is a well-known trick how the server can detect the difference even disregarding stings like the user agent header, but that trick doesn't work when you do $(wget ...). But I won't guarantee there isn't some other trick that can be performed.
- wareotie 8y agoIt looks awesome but... tmux with "control + a" instead of the default "control + b"? That is horrible! "control + a" moves you to the beginning of the line in bash (and in other shells, like zsh).
- abcdef123xyz123 8y agoIt works pretty well if you bind C-a to send C-a. It is easy to get used to pressing C-a twice for beginning of line, and if you do it outside tmux it is harmless.
- wareotie 8y agoAs someone who use intensively Tmux, I find easier to not touch the default configuration. Press twice vs use something that works perfectly.
- abcdef123xyz123 8y agoYou are quite lucky, C-a could easily have been the default and then you would have to either use it or have a config ;-). The disadvantage of C-b is that you need two hands to press it on a QWERTY keyboard, so I kind of wish I had picked C-x or something instead. But there is no consensus about what the default should be (lots of people use C-a, C-b, `, C-e, etc) so it is not worth changing now.
- wareotie 8y agoWith C-b you have less movement, C-a moves your hand in a weird form which creates pain in the hand. Apart from that, I use only my left hand to press C-b. C-a is the default one in Screen but as far as I remember C-b is the default one in Tmux since the beginning of the project. C-x is a bad idea too, because is another shortcut in bash (C-x + e bring up the $EDITOR). I think C-b is a good choice. The only thing I change in tmux is the pane and windows number (I prefer to start in 1 instead of 0 because I can type with less movement).
- 8y ago
- chrift 8y agoI've installed this and now realised I only want a few of the apps installed. Is there an uninstall command?
- deleted 8y ago[deleted]
- aaronkjones 8y agoThe packages that get installed are: git curl wget zsh tmux neovim It depends on what OS/platform you are using to uninstall a package. The configuration files are in the ".dotfiles" directory of your home folder. You can remove one or all of them from there and restart your terminal.