config.fish

User avatar
GekkoP
Emacs Sancho Panza
Posts: 4316
Joined: Tue Sep 03, 2013 7:05 am

config.fish

Unread post by GekkoP » Sun Mar 12, 2017 3:53 pm

I've been using/testing the Fish shell in the last couple of days.

My setup is here: https://github.com/manuel-uberti/dotfil ... onfig/fish

And for the Emacs lovers out there:

Code: Select all

(use-package fish-mode                  ; Handle Fish shell scripts
  :ensure t
  :mode ("\\.fish\\'" . fish-mode)
  :config
  ;; Run fish_indent before save
  (add-hook 'fish-mode-hook
            (lambda ()
              (add-hook 'before-save-hook 'fish_indent-before-save))))
Let's see if Fish can move me away from Zsh for a while.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 4316
Joined: Tue Sep 03, 2013 7:05 am

Re: config.fish

Unread post by GekkoP » Wed Mar 15, 2017 9:50 pm

So far so good. I particularly like the clean syntax for custom functions.

For instance:

Code: Select all

function get -d 'Download from a remote URL'
    if command --search 'curl' >/dev/null
        curl --continue-at - --location --progress-bar --remote-name --remote-time $argv
    else if command --search 'wget' >/dev/null
        wget --continue --progress=bar --timestamping $argv
    else
        echo 'Don\'t know how to download'
        return 1
    end
end

User avatar
akts
apt-getter
Posts: 76
Joined: Mon Sep 30, 2013 3:51 am
Location: /dev/null
Contact:

Re: config.fish

Unread post by akts » Sun Mar 19, 2017 1:42 pm

Fish ootb experience is pretty snazzy. It's almost like zsh + oh-my-zsh in a single package.

Thanks for the sauce GekkoP :)
Everything is funny, as long as it's happening to somebody else. -- Will Rogers

User avatar
GekkoP
Emacs Sancho Panza
Posts: 4316
Joined: Tue Sep 03, 2013 7:05 am

Re: config.fish

Unread post by GekkoP » Sun Mar 19, 2017 2:45 pm

^ Yes, it feels like a bloated zsh at first (which in turn feels like a bloated bash, which it's a bloated...). But it won me over with its completion and its syntax. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest