Skip to content

Commit

Permalink
fix config.fish for macOS/homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjenni committed Jan 21, 2024
1 parent 1afaf67 commit 9f0f0f5
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ set -x EDITOR "nvim"

set fish_greeting ""


switch (uname)
case Linux
if test -x /usr/bin/lesspipe.sh
set -x LESSOPEN "|lesspipe.sh %s"
end
case Darwin
set -g fish_user_paths "(brew --prefix)/bin" $fish_user_paths
if test -x (brew --prefix)/bin/lesspipe.sh
set -x LESSOPEN "|lesspipe.sh %s"
if test -d /opt/homebrew/bin
fish_add_path /opt/homebrew/bin
set -g fish_user_paths "(brew --prefix)/bin" $fish_user_paths
if test -x (brew --prefix)/bin/lesspipe.sh
set -x LESSOPEN "|lesspipe.sh %s"
end
end
# ensure openssl installed via brew is found before the system version (which is outdated)
# set -g fish_user_paths "/bin" $fish_user_paths
end

if test -d "$HOME/node_modules/.bin"
Expand All @@ -35,8 +37,6 @@ if test -d "$HOME/.cargo/bin"
end

fish_vi_key_bindings
# fish_ssh_agent
fish_add_path /opt/homebrew/sbin

if command -s zoxide > /dev/null
zoxide init fish | source
Expand All @@ -55,3 +55,11 @@ if command -s starship > /dev/null
bind --user \r transient_execute
bind --user -M insert \r transient_execute
end

if status is-login
if command -q neofetch
neofetch
else
uptime
end
end

0 comments on commit 9f0f0f5

Please sign in to comment.