jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.53k stars 257 forks source link

fisher install stuck #730

Closed flick0 closed 1 year ago

flick0 commented 1 year ago

image

jorgebucaran commented 1 year ago

@flick0 Could you post your config.fish? Maybe there's something in it that should run only if Fish is interactive.

hyperfocus1337 commented 1 year ago

Same issue.

image

Here is my config.

# Add Emacs binaries to path
fish_add_path ~/.emacs.d/bin

# Add Homebrew binaries to path
fish_add_path /opt/homebrew/bin
fish_add_path /opt/homebrew/sbin

# Initialize starship
starship init fish | source

# Chezmoi aliases
alias cm="chezmoi"
alias cmd="chezmoi diff"
alias cma="chezmoi apply"
alias cmas="chezmoi apply && doom sync"
alias cmaf="literate-fix"
alias cmad="chezmoi add"
alias cmcd="chezmoi cd"

# Kill word/line backwards
bind \cz backward-kill-word # Control + z to kill word backwards
bind \cx backward-kill-line # Control + x to kill line backwards

# Kill word/line forwards
bind \Ω kill-word # Option + z to kill word forwards
bind \≈ kill-line # Option + x to kill line forwards

# Properly login to bastion hosts with key forwarding
function ssh-bastion
  ssh-add -k $SSH_KEY_LOCATION
  ssh -A $SSH_CONFIG_INSTANCE_NAME
end

# Add tldr to path
fish_add_path ~/.tldr

# Change directory with fzf
function cd_with_fzf
  cd $HOME && cd (fd -t d | fzf --preview="tree -L 1 {}" --bind="space:toggle-preview" --preview-window=:hidden) && echo $PWD && tree -L 2
end

bind \co cd_with_fzf

# Search files with fzf
function show_files_fzf
  cd $HOME && fd -t f | fzf
end

bind \cl show_files_fzf

# Search history commands with fzf
alias hs='history | fzf'

# Initialization of pyenv
status is-login; and pyenv init --path | source
status is-interactive; and pyenv init - | source

# Pyenv homebrew fix
# https://github.com/pyenv/pyenv#homebrew-in-macos
alias brew="env PATH=(string replace (pyenv root)/shims '' \"\$PATH\") brew"

# Few simple directory related aliases
alias l="ls -la"
alias ..="cd .. && ls -la"
alias ...="cd ../.. && ls -a"
alias mkcd="mkdir $1 && cd $1"

# Tool aliases
alias k="kubectl"
alias tf="terraform"

# Few necessary env vars
set -x VISUAL vim
set -x KUBE_EDITOR vim

# Initialize asdf package manager
source (brew --prefix asdf)/libexec/asdf.fish

# Install fisher package manager
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
jorgebucaran commented 1 year ago

Last line of your config.fish. You are installing Fisher over and over again causing an infinite loop. Remove that.

Also, I suggest initializing Starship only if interactive.

flick0 commented 1 year ago

sorry for the late reply, this is my config


if status is-interactive
# Commands to run in interactive sessions can go here
end
# RosePine Color Palette
set -l foreground e0def4
set -l selectio  c4a7e7
set -l comment 908caa
set -l red eb6f92
set -l orange f6c177
set -l yellow ebbcba
set -l green 9ece6a
set -l purple c4a7e7
set -l cyan 9ccfd8
set -l pink ecaff2

Syntax Highlighting Colors

set -g fish_color_normal $foreground set -g fish_color_command $cyan set -g fish_color_keyword $pink set -g fish_color_quote $yellow set -g fish_color_redirection $foreground set -g fish_color_end $orange set -g fish_color_error $red set -g fish_color_param $purple set -g fish_color_comment $comment set -g fish_color_selection --background=$selection set -g fish_color_search_match --background=$selection set -g fish_color_operator $green set -g fish_color_escape $pink set -g fish_color_autosuggestion $comment

Completion Pager Colors

set -g fish_pager_color_progress $comment set -g fish_pager_color_prefix $cyan set -g fish_pager_color_completion $foreground set -g fish_pager_color_description $comment

Some config

set -g fish_greeting

Git config

set -g fish_git_prompt_show_informative_status 1 set -g __fish_git_prompt_showupstream informative set -g fish_git_prompt_showdirtystate yes set -g fish_git_prompt_char_stateseparator ' ' set -g fish_git_prompt_char_cleanstate '✔' set -g fish_git_prompt_char_dirtystate '✚' set -g fish_git_prompt_char_invalidstate '✖' set -g fish_git_prompt_char_stagedstate '●' set -g fish_git_prompt_char_stashstate '⚑' set -g fish_git_prompt_char_untrackedfiles '?' set -g fish_git_prompt_char_upstream_ahead '' set -g fish_git_prompt_char_upstream_behind '' set -g __fish_git_prompt_char_upstream_diverged 'ﱟ' set -g fish_git_prompt_char_upstream_equal '' set -g __fish_git_prompt_char_upstream_prefix ''''

Directory abbreviations

abbr -a -g l 'ls' abbr -a -g la 'ls -a' abbr -a -g ll 'ls -l' abbr -a -g lal 'ls -al' abbr -a -g d 'dirs' abbr -a -g h 'cd $HOME'

Locale

export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8"

Exports

export VISUAL="vim" export EDITOR="$VISUAL"

Term

switch "$TERM_EMULATOR" case 'kitty' export TERM='xterm-kitty' case '*' export TERM='xterm-256color' end

User abbreviations

abbr -a -g ytmp3 'youtube-dl --extract-audio --audio-format mp3' # Convert/Download YT videos as mp3 abbr -a -g cls 'clear' # Clear abbr -a -g h 'history' # Show history abbr -a -g upd 'yay -Syu --noconfirm' # Update everything abbr -a -g please 'sudo' # Polite way to sudo abbr -a -g fucking 'sudo' # Rude way to sudo abbr -a -g sayonara 'shutdown now' # Epic way to shutdown abbr -a -g stahp 'shutdown now' # Panik - stonk man abbr -a -g ar 'echo "awesome.restart()" | awesome-client' # Reload AwesomeWM abbr -a -g shinei 'kill -9' # Kill ala DIO abbr -a -g kv 'kill -9 (pgrep vlc)' # Kill zombie vlc abbr -a -g priv 'fish --private' # Fish incognito mode abbr -a -g sshon 'sudo systemctl start sshd.service' # Start ssh service abbr -a -g sshoff 'sudo systemctl stop sshd.service' # Stop ssh service abbr -a -g untar 'tar -zxvf' # Untar abbr -a -g genpass 'openssl rand -base64 20' # Generate a random, 20-charactered password abbr -a -g sha 'shasum -a 256' # Test checksum abbr -a -g cn 'ping -c 5 8.8.8.8' # Ping google, checking network abbr -a -g ipe 'curl ifconfig.co' # Get external IP address abbr -a -g ips 'ip link show' # Get network interfaces information abbr -a -g wloff 'rfkill block wlan' # Block wlan, killing wifi connection abbr -a -g wlon 'rfkill unblock wlan' # Unblock wlan, start wifi connection abbr -a -g ff 'firefox' #

Source plugins

Useful plugins: archlinux bang-bang cd colorman sudope vcs

if test -d "$HOME/.local/share/omf/pkg/colorman/" source ~/.local/share/omf/pkg/colorman/init.fish end

Make su launch fish

function su command su --shell=/usr/bin/fish $argv end

pokemon-colorscripts -r --no-title

alias bat='bat --theme="Catppuccin-mocha"' alias hc=herbstclient set MOZ_ENABLE_WAYLAND 1 set XDG_CURRENT_DESKTOP sway starship init fish | source

jorgebucaran commented 1 year ago

@flick0 Initialize Starship only if interactive.

I suggest removing this line too:

source ~/.local/share/omf/pkg/colorman/init.fish

and using instead PatrickF1/colored_man_pages.fish as a plugin.