tag:blogger.com,1999:blog-4013660499115623904.post2041865730064447149..comments2023-04-06T22:51:02.758+08:00Comments on 星之一角: Installing Ruby 1.9.2 on your MacLin Jen-Shin (godfat)http://www.blogger.com/profile/04471393622959484230noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4013660499115623904.post-43821574262585309222011-05-14T01:07:59.920+08:002011-05-14T01:07:59.920+08:00Sorry, I am not sure if it's you deleted your ...Sorry, I am not sure if it's you deleted your message, or it's blogger deleted it. If it's the latter, I can re-paste your comments.<br /><br />Here's my reply written yesterday but can't post it due to blogger's outage.<br /><br />* * *<br /><br />Thanks, glad to know it's helpful.<br /><br />Regarding fish shell, in short, it's a lot easier and<br />convenient to use out-of-the-box without custom<br />configuration. To name a few, syntax highlight,<br />helpful error messages, no issues using colorful<br />prompt, (I can't get bash colorful prompt right,<br />cursor position would be wrong if the line is too<br />long, totally no idea how to fix that.), and fish<br />script is a lot more sane than bash, too. Though<br />personally I avoid writing any shell scripts at all.<br /><br />But the best thing in fish is its history searching.<br />Suppose you have this fish_history:<br /><br />cd ~<br />ssh 123.123.123.123<br />gem install ripl-rc<br />rake test<br />rake test<br />rake test<br />rake test<br />brew install ruby<br />ls<br /><br />Then you can type `install` and press [up],<br />it would bring you `brew install ruby` with install<br />highlighted first. Then if you press [up] again,<br />it will bring you `gem install ripl-rc` and<br />highlighting install as well. You can also type<br />`ssh` and press [up], it will bring you<br />`ssh 123.123.123.123`. So I don't have to remember<br />any complex command, just type a fragment and<br />then press [up] [up] to find it. Also, searching<br />for `rake` would only give you once `rake test`,<br />instead of multiple times.<br /><br />The only drawback that I can't really stand is,<br />on Mac, fish sometimes would hang. I don't know<br />why, and I've heard that it's totally fine on Linux.<br /><br />But that might be the past. Someone has a patch<br />in Homebrew which would be applied if you're installing<br />fish via Homebrew. This patch reduces some timeout,<br />and it seldom hang now.<br /><br />bash is stable, fast, and widely supported. Personally<br />I run fish on top of bash without using chsh actually...<br />You can find it here: <a href="https://github.com/godfat/dev-tool/blob/fc797dd48bd4710dc24c5ea9f53d5bc03aae3498/.config/bash/profile#L18-21" rel="nofollow">bash/profile</a><br /><br />I didn't use zsh or tcsh much though, so can't<br />say anything about them. I only remembered from last<br />time I tried a bunch of shells, bash and fish was<br />the ones left I was picking from.Lin Jen-Shin (godfat)https://www.blogger.com/profile/04471393622959484230noreply@blogger.comtag:blogger.com,1999:blog-4013660499115623904.post-37315004287140787922011-05-12T23:31:32.576+08:002011-05-12T23:31:32.576+08:00Simple and clear how-to. Especially thanks for thi...Simple and clear how-to. Especially thanks for this line —<br />echo 'export PATH=$(brew --prefix ruby)/bin:$PATH' >> ~/.bash_profile<br /><br />What are benefits using fish shell instead bash or zsh?Андрейhttps://www.blogger.com/profile/08063448355702063852noreply@blogger.com