Use fish shell as login shell in Ubuntu

Install fish first

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish

Then the change shell command makes fish the default shell.

chsh -s /usr/bin/fish

If the fish is not there, use ‘which fish’ to locate it first and then chsh -s to it.

install wahoo

curl -L git.io/wa | sh

Wahoo is an all-purpose framework for the fishshell. It looks after your configuration, themes and packages. It is lightning fast and easy to use.

to install theme,

wa use THEMENAME

theme name is auto-complete like batman/agnoster etc.

install bd

Quickly go back to a parent directory up in your current working directory tree. Don’t write ‘cd ../../..’ redundantly, use bd instead.

Run make install. Assumes your fish config directory is ~/.config/fish.

install autojump

autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.

Directories must be visited first before they can be jumped to.

  • Clone the autojump repository:
  • Install autojump to a local ~/.autojump directory:
1
2
$ cd autojump
$ ./install.py
  • Source the autojump.fish file in your fish configuration, by opening the file ~/.config/fish/config.fish in an editor and adding these lines:
1
2
3
4
5
6
begin
    set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/autojump.fish
    if test -e $AUTOJUMP_PATH
        source $AUTOJUMP_PATH
    end
end
  • Exit the fish shell and start it again. Visit your commonly used directories with the cd command. You can now jump to these directories by using the j command:
1
2
3
4
5
$ cd /some/superlongdirectoryname
$ cd
$ j tory
$ pwd
/some/superlongdirectoryname
  • To see statistics of entries in autojump history:
1
$ j -s

autojump from here

The fish.config under ~/.config/fish

alias vi="vim"

begin
    set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/autojump.fish
    if test -e $AUTOJUMP_PATH
        source $AUTOJUMP_PATH
    end
end

set -g WAHOO_PATH $HOME/.wahoo
set -g WAHOO_CUSTOM $HOME/.dotfiles
source $WAHOO_PATH/init.fish

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s