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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

fish shell

122 点作者 atldev超过 11 年前

23 条评论

dfc超过 11 年前
The fact that you cannot redirect stderr to stdout and pipe to another command is a bit of a stumbling point for me. When I saw the bug[1] for the first time I thought that it must be some strange corner case, but it turns out it is a real bug. After reading the bug report I started to wonder if there were any other other unixy features that were missing. I&#x2F;O redirection is a core unix concept in my opinion.<p>[1] &quot;Redirect stderr to stdout and pipe doesn&#x27;t work as expected&quot; <a href="https://github.com/fish-shell/fish-shell/issues/110" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;issues&#x2F;110</a>
评论 #6225457 未加载
评论 #6226938 未加载
评论 #6228132 未加载
stevelosh超过 11 年前
I&#x27;ve been using fish for a while now. Overall it&#x27;s pretty great.<p>Here&#x27;s my fish config if you want to see an example: <a href="https://bitbucket.org/sjl/dotfiles/src/tip/fish/config.fish" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;sjl&#x2F;dotfiles&#x2F;src&#x2F;tip&#x2F;fish&#x2F;config.fish</a>
评论 #6224953 未加载
评论 #6225244 未加载
评论 #6228305 未加载
评论 #6225726 未加载
9ac345a5509a超过 11 年前
Previous discussions:<p><pre><code> https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5723235 https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5567639 https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4073162</code></pre>
JelteF超过 11 年前
I tried fish, last time it was posted. I quickly abandoned it though.<p>One of my main commandline utilities is git in combination with git-flow(amazing). I found the normal git completion lacking. I believe branches didn&#x27;t get completed correctly in combination with some commands. The git-flow completion was non existent.<p>When that changes I might try it again. But for a shell that has tabcompletion as a selling point I was very unimpressed.
appplemac超过 11 年前
One of my favourite features: a single configuration file. No more .bashrc and .bash_profile .<p>However, it seems like Fish is not fully POSIX-compatible, therefore you can face weird problems in Vim plugins, for example.
评论 #6225250 未加载
评论 #6225926 未加载
ballard超过 11 年前
For people that just don&#x27;t care about advanced features or gotchas, fish seems fine.<p>For people that exploit redirection, file handle rewiring, here docs and such... consider zsh with <a href="https://github.com/sorin-ionescu/prezto" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sorin-ionescu&#x2F;prezto</a>
matthewlehner超过 11 年前
I like the features it has, but every time someone post a link to fish shell, I wonder why I would switch from bash or zsh. Will this really be THAT MUCH BETTER? Will I just run into weird errors? Is it totally sh compliant? These are important things to know and should be on the homepage.
评论 #6224948 未加载
评论 #6224770 未加载
评论 #6225409 未加载
评论 #6225381 未加载
mmanfrin超过 11 年前
I really liked fish, but as someone who is still learning bash&#x2F;cli scripting, it makes things difficult when instructions from programs come only in Bash syntax, which does not work well with fish (some things with homebrew were an absolute nightmare to install).
评论 #6227000 未加载
评论 #6228006 未加载
Symmetry超过 11 年前
I&#x27;ve been using fish for a while and have generally been very happy, I&#x27;m even working on creating a set of functions for ROS to integrate with fish the way it currently does with bash and zsh. My one tiny gripe is the way that if I<p><pre><code> set foo this that &quot;the other&quot; </code></pre> then<p><pre><code> echo $faux; echo $faux[1] </code></pre> doesn&#x27;t produce anything, but<p><pre><code> echo $foo[4] </code></pre> gives me an error message that I can&#x27;t just pipe to &#x2F;dev&#x2F;null<p>Also, writing autocompletes for functions is both far simpler than in bash, but I&#x27;m also missing some of tools that bash provides.
评论 #6231127 未加载
fjcaetano超过 11 年前
Why is this interesting when we have zsh?<p><a href="https://github.com/robbyrussell/oh-my-zsh?source=cc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;robbyrussell&#x2F;oh-my-zsh?source=cc</a>
评论 #6224983 未加载
评论 #6224934 未加载
评论 #6225718 未加载
评论 #6224947 未加载
sdfjkl超过 11 年前
Fish is a great interactive shell. I&#x27;ve been using it for some time now.<p>A few things I occasionally run into: You can&#x27;t just paste somebodies setup instructions into your shell anymore (you can temporarily invoke bash for that though). And when writing setup instructions yourself, sh is still pretty much the standard. VirtualEnv generates an activate.fish out of the box - nice! I still occasionally type !grep by accident. And I do miss &amp;&amp;.
d5ve超过 11 年前
I defined the following function to convert my bash aliases to fish functions, which eased my switchover a bit. I saved it as ~&#x2F;.config&#x2F;fish&#x2F;functions&#x2F;import_bash_aliases.fish<p><pre><code> function import_bash_aliases --description &#x27;bash aliases to .fish function files.&#x27; for a in (cat ~&#x2F;.bashrc | grep &quot;^alias&quot;) set aname (echo $a | grep -Eoe &quot;[a-z0-9]+=&quot; | sed &#x27;s&#x2F;=&#x2F;&#x2F;&#x27;) set command (echo $a | sed &#x27;s&#x2F;^alias .*=&#x2F;&#x2F;&#x27; \ | sed &#x27;s&#x2F;^ *\&#x27;&#x2F;&#x2F;&#x27; | sed &#x27;s&#x2F;\&#x27; *$&#x2F;&#x2F;&#x27; ) echo &quot;Processing alias $aname as $command&quot; if test -f ~&#x2F;.config&#x2F;fish&#x2F;functions&#x2F;$aname.fish echo Function $aname is already defined. Skipping... else alias $aname $command funcsave $aname end end end</code></pre>
patrickg超过 11 年前
I have been using fish for a few months exclusively on my Mac. I really miss a few bashisms: mostly pressing esc-. inserts the last part of the last command. I have not changed the shell on my server, somehow I am afraid of breaking things... (bad shell scripts that don&#x27;t have correct shebang line).
评论 #6225315 未加载
评论 #6225452 未加载
mkname超过 11 年前
I just took fish for a quick spin, and... wow -- I am impressed. It really feels &quot;interactive&quot;. I don&#x27;t think I&#x27;ll replace my battle tested zsh, but even as a &quot;grumpy old man&quot;: you should at least try it. It feels really... fresh.
dmotz超过 11 年前
One thing I missed in fish was bash&#x27;s sudo !! to quickly re-execute a command.<p>A replacement is easy enough though and is in my config here: <a href="https://github.com/dmotz/dotfiles/blob/master/functions/sudo!!.fish" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dmotz&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;functions&#x2F;sudo...</a><p>Beyond a few other syntax incompatibilities, I&#x27;ve enjoyed using it.
0xACE超过 11 年前
Gave fish a shot for a week or so. It gives some &quot;oohs and ahs&quot; right off the bat, but in the long term, not something that I could use.<p>Maybe if it was at least somewhat bash or POSIX compatible I would be on board, but the developers don&#x27;t even seem to want to help us out in that regard.
reledi超过 11 年前
I&#x27;ve been using fish for about 3 months now and I love it. Switched from bash.<p>Here&#x27;s a presentation I gave to my local coder community on fish: <a href="http://www.youtube.com/watch?v=SWmKfb2jQhU" rel="nofollow">http:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SWmKfb2jQhU</a>
cwp超过 11 年前
&quot;Finally, a command line shell for the 90s&quot;<p>Now that&#x27;s an odd slogan. Is it trying to make the point that the competition is even older? Appeal to old-school hackers? Subtly tell me that the project hasn&#x27;t been updated in a while?
评论 #6227888 未加载
atldev超过 11 年前
See it in action here: <a href="http://youtu.be/MVw8N3hTfCI?t=56s" rel="nofollow">http:&#x2F;&#x2F;youtu.be&#x2F;MVw8N3hTfCI?t=56s</a>
tuananh超过 11 年前
the developer should provider a converter tool to convert .bashrc&#x2F;.zshrc to fish config
评论 #6225321 未加载
aidenn0超过 11 年前
fish: the shell for people who want to use multi-line echo instead of here-docs.
pit超过 11 年前
Oooh, it&#x27;s like a MUD!
hrkristian超过 11 年前
I like auto-complete in web-browsers, but I can&#x27;t see a single use for it in my terminals. After all, what Linux-user hasn&#x27;t automated their terminal input to some degree? Nah, I&#x27;ll stick with my [TAB]...
评论 #6225039 未加载
评论 #6225000 未加载