TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Fish Shell 3.2

280 点作者 zanchey大约 4 年前

34 条评论

sdfjkl大约 4 年前
Fish is my shell of choice for a couple years now. Not because it&#x27;s the perfect shell, but because it&#x27;s a lot better than any other for interactive shells.<p>For scripting I still stick to bash because it&#x27;s more portable and I already know how to cope with its warts. And sometimes when I can&#x27;t remember the fish syntax by heart, I just launch a bash from inside fish to run my command and then Ctrl-D :-)
评论 #26303508 未加载
评论 #26304734 未加载
评论 #26304249 未加载
xerxesaa大约 4 年前
Don&#x27;t have anything to add to this except to say thanks to the team for an amazing product. Been using fish shell for 5+ years now and I love it. &quot;Finally, a command line shell for the 90s&quot;!
评论 #26303367 未加载
评论 #26303254 未加载
synthc大约 4 年前
I love fish, and have been using it as my shell for over 10 years, it&#x27;s pretty much the first thing I install on a new system.<p>I usually heavily tweak the settings of the applications I use, make my own custom themes etc, but the defaults of fish are so good that I hardly changed anything.<p>I only installed 3 plugins (z,fzf,and virtualfish) and that&#x27;s it, it&#x27;s super productive.<p>Completion from history, persistently setting enviroment variables, defining functions, the syntax, everything is much more ergonomic and sane than in bash.<p>I&#x27;m sure you can tweak zsh or even bash to achieve something similar, but why bother?<p>Also, i don&#x27;t mind the incompatibility with bash: the fish language is much more sane, and you can easily use bash if needed.
评论 #26307629 未加载
评论 #26309706 未加载
Zhyl大约 4 年前
I&#x27;m surprised that Fish isn&#x27;t used more for education. I don&#x27;t know of any distros aimed at new users which have fish as the default. I don&#x27;t think I&#x27;ve seen <i>any</i> tutorials that use fish to teach shell concepts.<p>It seems like such a missed opportunity, especially at a time when Linux Gaming is on the rise. There&#x27;s a whole audience that would have the activation energy of getting into shell scripting lowered by being slightly more friendly and approachable than bash.<p>I feel like fish is the python of shells, and python has more than proved that a language being &#x27;easy&#x27; and approachable makes it <i>much</i> more appealing to a wider audience.
评论 #26304355 未加载
评论 #26306001 未加载
评论 #26304533 未加载
评论 #26304185 未加载
评论 #26304335 未加载
awalGarg大约 4 年前
As someone with a teeny tiny commit in this release and a maintained personal fork, I feel compelled to say that the biggest benefit of fish over bash&#x2F;zsh for me is not just the OOTB completions UX etc., but also how much more approachable it is to hacking. I would never even bother reading the source code of bash again, let alone try to patch it, because I have 0 confidence that something completely unrelated is not gonna break.
ddeville大约 4 年前
&gt; Significant performance improvements to completion of the available commands (#7153), especially on macOS Big Sur where there was a significant regression (#7365, #7511).<p>This is buried down in the Completion section but this is a big deal if you’ve upgraded to MacOS Big Sur: completing a command could hang the shell for 10-15 seconds making it nearly unusable. Thanks for fixing this!
评论 #26305510 未加载
mejutoco大约 4 年前
Fish is my shell of choice, like many in this thread. To me it just works, without configuring anything (ok, maybe a couple of aliases), with great defaults.<p>As an example, type anything(for instance, &#x27;.conf&#x27;) + up arrow, and there you see all the completions (for instance, &#x27;less &#x2F;etc&#x2F;postgresql&#x2F;10&#x2F;main&#x2F;pg_hba.conf&#x27; shows for me) based on the shell history. You can then cycle through them with up&#x2F;down arrows. It is the same as ctrl+R in bash, but so discoverable and plain. I found tons of similar details in fish.<p>Edit: typos
评论 #26304823 未加载
评论 #26312019 未加载
评论 #26303889 未加载
评论 #26303448 未加载
SAI_Peregrinus大约 4 年前
I think Fish is an excellent interactive shell. I&#x27;ve still got Bash as my default shell for non-interactive sessions, but I configured Konsole to start Fish by default for interactive use (Settings-&gt;Command, set to the path to the fish executable). That way scripts that need Bash still work, but I get a sane environment for interaction. For &quot;portable&quot; scripts I write POSIX shell, C, or Python, depending on what I need to be portable to.<p>fish_add_path will solve one of the few annoying things about Fish.<p>I&#x27;ve been looking at trying Oil as a Bash replacement though, I think Oil for scripting + Fish for interaction might be a best-of-both-worlds setup.
评论 #26306101 未加载
评论 #26303531 未加载
评论 #26305524 未加载
geoelectric大约 4 年前
I used fish shell for a lot of years.<p>Ultimately, I got tired of having to translate snippets for my use and went back to zsh for the bash compatibility. Zsh becoming the Mac default also gave me an incentive, because I prefer to use system native if it&#x27;s anywhere near up to date.<p>But a lot of what I have to cobble together in zsh via antigen and omz was batteries-included or fisherman-easy in fish. It&#x27;s very powerful right out of the box. I miss it all the time, and it may get me back before it&#x27;s done.
评论 #26308024 未加载
acdha大约 4 年前
I put off switching from bash for years but quit cold turkey for fish a couple of years ago, and find myself appreciating that almost daily.<p>One of the underappreciated values is that while you can configure it you get great functionality out of the box. Switching was chsh, picking a theme in the interactive config, and going back to work. The only I’ve really felt the need to do was to add the Terraform workspace to my prompt, which was quite easy.
评论 #26305545 未加载
bogdan大约 4 年前
Fish is my favourite shell because among other things, it has the best support for vi key bindings. I have been using the master version of it without any issues for more than half a year now for the undo &#x2F; redo support and I&#x27;m glad the team has finally released it to stable. Thanks to everyone who worked on this! If anyone is reading this and is using vi mode with bash or zsh, give fish a try, it&#x27;s so much better!
评论 #26304461 未加载
评论 #26303594 未加载
评论 #26305411 未加载
meddlepal大约 4 年前
I used fish for a couple years but switched back to zsh. I found the incompatibilities with bash&#x2F;zsh to be annoying at times and finally just decided to do the &quot;When in Rome do as the Romans&quot; do thing and adopt zsh.
评论 #26306233 未加载
评论 #26306189 未加载
评论 #26304281 未加载
ElijahLynn大约 4 年前
FINALLY!!!!!!<p>A new &quot;fish_add_path&quot; helper function to add paths to $PATH without producing duplicates, to be used interactively or in config.fish (#6960, #7028). For example:<p>fish_add_path &#x2F;opt&#x2F;mycoolthing&#x2F;bin<p>will add &#x2F;opt&#x2F;mycoolthing&#x2F;bin to the beginning of $fish_user_path without creating duplicates, so it can be called safely from config.fish or interactively, and the path will just be there, once.
评论 #26313631 未加载
mettamage大约 4 年前
I see a lot of enthusiasm for fish. Can someone point me to some resources that I can check?<p>Not the best comparison but: vim has vimtutor, a couple of good vim games and so on. Is there anything for fish?
评论 #26304142 未加载
评论 #26304207 未加载
kbd大约 4 年前
Folks make a big deal about everything Fish gives you out of the box, but for someone who already has Zsh well–configured (eg. syntax highlighting, autosuggestions, fzf), can someone sell me on things I might be missing out on from Fish?
评论 #26304516 未加载
评论 #26303837 未加载
PoignardAzur大约 4 年前
&gt; A new special input function forward-single-char moves one character to the right, and if an autosuggestion is available, only take a single character from it (#7217, #4984).<p>Huh.<p>It feels super weird to see this finally hit release. Feels like a lifetime ago that I made this patch, I&#x27;d completely forgotten about it.<p>Since then I&#x27;ve gone through another lockdown, quit my job, started a Rust GUI framework, and started doing self-employed consulting.<p>Also it feels kind of humbling to think about the weeks I spent writing it, and then see that it&#x27;s only a bullet point in a changelog that has hundreds of them (most of them a lot more useful than mine).<p>Cheers to the fish community!
jacobsenscott大约 4 年前
Fish has saved me from so many hours of zsh yak shaving. It is the best.
pcr910303大约 4 年前
I used to really use fish pervasively in my computer, but after a while I realized that I forgot literally all of bash (like I forgot how for-loops look like, how word split works…) and I just switched back to macOS default zsh.<p>I’m still wanting a fish-alike interative shell that improves on the Bourne shell language (and bash extensions). I’m having hopes on Oil shell [0], but it’s still in an early stage so I guess I’ll have to wait for a far future…<p>[0]: <a href="https:&#x2F;&#x2F;oilshell.org" rel="nofollow">https:&#x2F;&#x2F;oilshell.org</a>
stunt大约 4 年前
My favorite Fish plugins:<p>- jorgebucaran&#x2F;fisher - Plugin manager<p>- IlanCosman&#x2F;tide - Nice prompt with git status<p>- jorgebucaran&#x2F;humantime.fish - Turn milliseconds into a human-readable string in Fish.<p>- franciscolourenco&#x2F;done - Automatically receive notifications when long processes finish.<p>- laughedelic&#x2F;pisces - Helps you to work with paired symbols like () and &#x27;&#x27; in the command line.<p>- jethrokuan&#x2F;fzf - To integrate fzf (junegunn&#x2F;fzf)
评论 #26314846 未加载
erichurkman大约 4 年前
The performance fix for macOS [0] is very welcomed. I&#x27;ll be glad to get rid of the ugly hacks in my fish config files. Looks like an amazing release all around.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;pull&#x2F;7365" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;pull&#x2F;7365</a>
jorgebucaran大约 4 年前
Thank you Zanchey, Ridiculousfish, Fabian, and everyone else!
joseluisq大约 4 年前
Wow many improvements especially in the scripting. Definitely I will try it out.<p>BTW I still waiting for <a href="https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;issues&#x2F;510" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;issues&#x2F;510</a><p>Congrats for the release!
ogre_codes大约 4 年前
Love fish, but I always add the Bob the Fish theme which adds a really nice Powerline command line theme which effectively shows me current <i>git</i> status with just enough info to be useful much of the time.
iamevn大约 4 年前
I absolutely love fish. Completions and colors and all that are nice but the killer feature for me is the scripting. I can actually throw a loop or a one-off function together for whatever random task I have and not have to worry about arcane syntax or weird gotchas. I used bash for years and anything that requires more than some pipes would either not get done or get done in a heavier-duty programming language. With fish things just made sense and I was immediately solving more complex problems at the shell.
rtkaratekid大约 4 年前
When in college my prof dared me to switch from bash to fish (because he thought it would be a funny failure) and I&#x27;m still using it today. It&#x27;s a fantastic shell!
sontek大约 4 年前
I&#x27;ve been using fish for 3 months now after using Bash for 20. I&#x27;m probably going to switch back in the next few days.<p>I <i>LOVE</i> fish but they went out of their way to not be compatible with Bash (like (pwd) instead of $(pwd) for expanding) that break a lot of existing scripts.<p>The breaking point for me was when the rust&#x2F;cargo env didn&#x27;t work in it because they don&#x27;t have compatible case statements.
评论 #26310999 未加载
enriquto大约 4 年前
I&#x27;d like to use fish regularly, but I feel really attacked by the over-the-top usage of color and unrequested auto-completion. Even a &quot;monochrome&quot; theme I tried was shoveling many different shades of gray into my terminal. It does not seem to honor the NO_COLOR variable either. Is there any way to obtain a default configuration with everything disabled?
评论 #26303803 未加载
评论 #26308027 未加载
ElijahLynn大约 4 年前
Been using Fish for many years now, I love the abbreviations feature the most, as it auto expands and doesn&#x27;t hide the magic!
away_throw大约 4 年前
Probably my favorite feature with fish is the improved globs. I can do<p><pre><code> **.pdf </code></pre> to recursively get all pdfs or<p><pre><code> *{.flac,.mp3} </code></pre> to only get flac and mp3 files from a directory.
mattgreenrocks大约 4 年前
Congrats on the release! Fish is a wonderful piece of software and keeps getting better.<p>I don&#x27;t miss zsh and the pages of configuration at all.
diegocg大约 4 年前
&gt;undo is bound to Control+Z, and redo to Alt+&#x2F;<p>Unfortunate choice of keys for redo IMO
评论 #26309312 未加载
评论 #26311260 未加载
xyst大约 4 年前
what&#x27;s the difference between this and zsh? both seem to have the same set of features. also zsh is the default shell for macOS (as of Catalina)
评论 #26305057 未加载
ducktective大约 4 年前
I always see these posts, get tempted to use fish instead of bash but then I ask the ubiquity question and end up saying &quot;Not today...&quot;
评论 #26303513 未加载
评论 #26305004 未加载
评论 #26303472 未加载
评论 #26303524 未加载
kderbyma大约 4 年前
I forked fish for fun into ghoti