Seriously you can get on fi(r)st page of HN with 5% of man bash?
Mastering Bash and Terminal
71–80 of 186 posts
Re: Mastering Bash and Terminal
#72Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/ot…
IMO, :make is (usually) better, because it adds errors to the quickfix list, and put your cursor on the first error location.
Re: Mastering Bash and Terminal
#73Earlier quoted context omitted.
Regarding the last git command you listed, I actually find it better to do :r !git status -v And at the to of the result, type my formatted git commit message, visually highlight the message I just typed, and then use the following vim command :r !git commit -F - Which reads the commit message from standard input.
That's interesting, why not just do `git commit` at the command line?
Re: Mastering Bash and Terminal
#74Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/ot…
You can also use :sh which just starts a new subshell in the terminal and puts you back in vim when you exit it.
Re: Mastering Bash and Terminal
#75Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/ot…
> :!make IMO, :make is (usually) better, because it adds errors to the quickfix list, and put your cursor on the first error location.
Re: Mastering Bash and Terminal
#76I also assume you're using bash. I know there are some cool newcomers out there like zsh and fish While there is much useful in this post, I always find comments like this one odd. bash was released back in 1989, zsh was released one year later, in 1990. One year difference in age almost thirty years ago means that you can't really call zsh a newcomer. Maybe he's talking about adoption, though.
Some people just lack the perspective.
Re: Mastering Bash and Terminal
#77I actually resolved most of that common issues with just bash: :) Substring history search, so you can use just a substring to look for a argument,command. Binded to ctr+r/s by default. ;) https://github.com/liloman/asyncBash#use Changing directories: Last n directories, transparent popd/pushd. https://github.com/liloman/dirStack Movements: vim-surround for your cli, so you can do ysiw" o whatever... ;) https://githu…
I'm gonna steal some ideas from asyncBash
Re: Mastering Bash and Terminal
#78Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/ot…
Regarding the last git command you listed, I actually find it better to do :r !git status -v And at the to of the result, type my formatted git commit message, visually highlight the message I just typed, and then use the following vim command :r !git commit -F - Which reads the commit message from standard input.
Try emacs with magit. It's really great.
Re: Mastering Bash and Terminal
#79Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/ot…
I am an avid emacs user though. I really should check out vim.
Re: Mastering Bash and Terminal
#80Earlier quoted context omitted.
It would indeed be in the best interest of its users, but Apple has apparently decided that it would not be in its own best interest: http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/ […] Anyway, the message is pretty obvious: Apple won’t ship anything that’s licensed under GPL v3 on OS X. Now, why is that? There are two big changes in GPL v3. The first is that it explicitly prohibits patent lawsuits against pe…
Or, it could just switch the default shell to Z shell. First thing I do on a new Mac, is chsh -> zsh. Ships with an up to date (enough) version of that.