Live data from Hacker News

Fish: Finally, a command line shell for the 90s

ridiculousfish.com

101–110 of 155 posts

Re: Fish: Finally, a command line shell for the 90s

#102

Very poor support for alias: batman@batman ~/D/S/rails> alias foo="cd ~/" fish: Could not expand string '$tmp[2]' /usr/local/share/fish/functions/alias.fish (line 19): set body $tmp[2] ^ in function 'alias', called on standard input, with parameter list 'foo=cd ~/' Makes me wonder what else I'll have to relearn to use fish. Can someone tell me if it's worth the effort? Edit: didn't take me long to find something wors…

I never use alias in fish, just functions - see the Fish design document, law of orthogonality: http://fishshell.com/user_doc/design.html#ortho

That infinite loop thing is a bug for sure, it shouldn't do that! I have defined that type of function to jump to the directories of current projects - that should work.

Re: Fish: Finally, a command line shell for the 90s

#103

Very poor support for alias: batman@batman ~/D/S/rails> alias foo="cd ~/" fish: Could not expand string '$tmp[2]' /usr/local/share/fish/functions/alias.fish (line 19): set body $tmp[2] ^ in function 'alias', called on standard input, with parameter list 'foo=cd ~/' Makes me wonder what else I'll have to relearn to use fish. Can someone tell me if it's worth the effort? Edit: didn't take me long to find something wors…

That alias-example works for me with the current fish version from Arch-Linux. (And that seems to be the fishfish fork, from what I can tell.)

Re: Fish: Finally, a command line shell for the 90s

#104

Very poor support for alias: batman@batman ~/D/S/rails> alias foo="cd ~/" fish: Could not expand string '$tmp[2]' /usr/local/share/fish/functions/alias.fish (line 19): set body $tmp[2] ^ in function 'alias', called on standard input, with parameter list 'foo=cd ~/' Makes me wonder what else I'll have to relearn to use fish. Can someone tell me if it's worth the effort? Edit: didn't take me long to find something wors…

I never use alias in fish, just functions - see the Fish design document, law of orthogonality: http://fishshell.com/user_doc/design.html#ortho That infinite loop thing is a bug for sure, it shouldn't do that! I have defined that type of function to jump to the directories of current projects - that should work.

> I have defined that type of function to jump to the directories of current projects - that should work.

What do you mean? Even if I define a function like so:

    function foo; cd /var; end
It shouldn't automatically execute the function and cd into /var.

Re: Fish: Finally, a command line shell for the 90s

#105
post #101

Can you make this work in fish? http://www.developerzen.com/2011/01/10/show-the-current-git-...

Don't see why not.

Right, but I meant, "Tell me how". I figured it out and dashed off a quick post: http://herdrick.tumblr.com/post/24563032599/display-git-bran...

Re: Fish: Finally, a command line shell for the 90s

#106
post #101

Earlier quoted context omitted.

Don't see why not.

Right, but I meant, "Tell me how". I figured it out and dashed off a quick post: http://herdrick.tumblr.com/post/24563032599/display-git-bran...

You can also find `how' on the Arch-Linux Wiki (https://wiki.archlinux.org/index.php/Fish#Configuration_Sugg...).

Also judging by your blog you might like something like

    PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER \
                   "$(pwd) $(history 1)" >> ~/.bash_eternal_history'
in your .bashrc, so that you don't have to abuse the bash-history for keeping a lifetime of commands around.

Re: Fish: Finally, a command line shell for the 90s

#107
post #106

Earlier quoted context omitted.

Right, but I meant, "Tell me how". I figured it out and dashed off a quick post: http://herdrick.tumblr.com/post/24563032599/display-git-bran...

You can also find `how' on the Arch-Linux Wiki ( https://wiki.archlinux.org/index.php/Fish#Configuration_Sugg... ). Also judging by your blog you might like something like PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER \ "$(pwd) $(history 1)" >> ~/.bash_eternal_history' in your .bashrc, so that you don't have to abuse the bash-history for keeping a lifetime of commands around.

Is it abuse? It hasn't slowed anything down yet.

Also, in the blog post I linked to the link you mention.

Re: Fish: Finally, a command line shell for the 90s

#108
post #13

Earlier quoted context omitted.

I'd been using fish for a year or two before switching to zsh too. The main reason for me to give it up is because I could not get it to work smoothly with rvm. I've gotten quite used to zsh by now, and I have to say, I don't feel much for having another go at fish just to run into the same limitations again.

I just downloaded it and while it looks awesome, I see the rvm problem. I haven't used zsh but I'm assuming from your comment that zsh is compatible with RVM. Seems like it shouldn't be too hard to write a fish version of the script that sets up your rvm environment, but if you've gone down that path and it proved too painful I won't bother. However, perhaps fish + rbenv works. Has anyone tried that?

Yes, I switched from rvm to rbenv because rvm didn’t work with fish. rbenv did work with fish.

I switched away from fish after that because go (a directory-jumping tool) required bash to install (http://code.google.com/p/go-tool/wiki/InstallNotes). I didn’t know how to port that bash code to fish, since I don’t know bash scripting, and I also anticipated that I would keep finding cool programs that didn’t work with fish.

Re: Fish: Finally, a command line shell for the 90s

#109
post #77

Man, I used to use fish. It was great. It was like all the things people eventually make zsh do but in one convenient binary. I think my favorite feature was that history was instantly shared among all your open fish instances.

zsh used to do this for me (back when I used it; switched back to bash about a year ago now), and it was the most _annoying_ thing it ever did. My typical workflow (when working on a software project) involves a pair of terminals for compiling and execution, an editor window (whether gvim or kate/kile/kdevelop etc.), and a documentation terminal for manpages. Oftentimes my execution lines are somewhat long -- enablin…

You could have simply turned history sharing off...

Re: Fish: Finally, a command line shell for the 90s

#110

Under the known bugs and issues: History file should apply some kind of maximum history length Fine, but the default needs to be large, like 100MB. Disks are big now. I hope ridiculousfish agrees.

100 MB is indeed small but there are privacy concerns with storing hundreds of thousands of lines of history. Do you really want every command you've typed for the last several years to be visible to anyone with physical access to your box? It could contain clear-text passwords to other machines.

I'd be happy with 100 MB as a maximum size but there should also be time-based limits, like remove anything from history that is older than a few months.

Post reply on HN