Skip to content

Instantly share code, notes, and snippets.

@monfresh
Last active March 27, 2019 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monfresh/2f7c2e1ccfc7fdb3ab7877e90c4ba983 to your computer and use it in GitHub Desktop.
Save monfresh/2f7c2e1ccfc7fdb3ab7877e90c4ba983 to your computer and use it in GitHub Desktop.
Notes on installation of fish shell on macOS

notes on installing fish shell

brew install fish

add /usr/local/bin/fish to /etc/shells

chsh -s /usr/local/bin/fish
  • move aliases to ~/.fish_aliases

  • replace && with command; command

  • move export statements to ~/.fish_variables

  • make sure opening a new tab doesn't generate errors. fix if any. To fix hub:

remove hub from .bash_profile

brew uninstall --force hub
brew install hub

Wrap git automatically by adding the following to ~/.config/fish/functions/git.fish:

function git --wraps hub --description 'Alias for hub, which wraps git to provide extra functionality with GitHub.'
    hub $argv
end
brew install chruby-fish

create ~/.config/fish/config.fish with this:

source ~/.fish_aliases
source ~/.fish_variables
source /usr/local/share/chruby/chruby.fish
source /usr/local/share/chruby/auto.fish
chruby ruby-2.5.1

install omf: https://github.com/oh-my-fish/oh-my-fish

omf install doughsay

got this error:

fish: Unknown command 'vcs.present'
~/.config/fish/functions/fish_prompt.fish (line 1):
if vcs.present
   ^
in function '__doughsay_vcs'
	called on line 6 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
	called on standard input

in command substitution
	called on standard input

loading new tab got rid of error

omf theme doughsay

add customizations, like doughsay_ruby in ~/.config/fish/functions/fish_prompt.fish:

__doughsay_user
__doughsay_pwd
__doughsay_ruby
__doughsay_vcs
__doughsay_prompt $last_status
  
...

function __doughsay_ruby
  if [ -f ".ruby-version" ]
    set -l ruby_version (cat .ruby-version)
    set_color yellow
    echo -n "$ruby_version "
  end
end

NVM:

cd ~
mkdir .nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
omf install nvm
brew uninstall --ignore-dependencies --force node

had to run this again:

ln -s  "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

To add GitHub SSH key to agent: eval (ssh-agent -c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment