-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fisher doesn't load plugins when using custom XDG_CONFIG_HOME #462
Comments
@arwtyxouymz What are the contents of your fishfile?
|
@jorgebucaran 0rax/fish-bd
edc/bass
fisherman/getopts
fisherman/spin
fisherman/z
oh-my-fish/plugin-peco
oh-my-fish/theme-bobthefish What is wrong? |
@arwtyxouymz Your fishfile looks perfect. I don't know what's wrong. There is not enough information to make an assessment. I can see from the output of What is the output of: la ~/.config/fisher It should be: total 0
drwxr-xr-x 3 x staff 96B Oct 7 23:03 .
drwxr-x--- 12 x staff 384B Oct 7 23:03 ..
drwxr-xr-x 3 x staff 96B Oct 7 23:03 github.com |
@arwtyxouymz Let's try something. Run |
Firstly, the output of 合計 12K
drwxrwxr-x 3 ryutaro ryutaro 4.0K 10月 7 23:44 ./
drwx------ 24 ryutaro ryutaro 4.0K 10月 7 23:44 ../
drwxrwxr-x 6 ryutaro ryutaro 4.0K 10月 7 23:44 github.com/ sorry that output is japanese.... Next, the log of To completely erase z's data, remove:
/home/ryutaro/.local/share/z/datafetching https://codeload.github.com/oh-my-fish/theme-bobthefish/tar.gz/master
fetching https://codeload.github.com/edc/bass/tar.gz/master
fetching https://codeload.github.com/0rax/fish-bd/tar.gz/master
fetching https://codeload.github.com/fisherman/spin/tar.gz/master
fetching https://codeload.github.com/fisherman/z/tar.gz/master
fetching https://codeload.github.com/oh-my-fish/plugin-peco/tar.gz/master
linking __bobthefish_colors.fish
linking __bobthefish_display_colors.fish
linking __bobthefish_glyphs.fish
linking bobthefish_display_colors.fish
linking fish_greeting.fish
linking fish_mode_prompt.fish
linking fish_prompt.fish
linking fish_right_prompt.fish
linking fish_title.fish
linking __bass.py
linking bass.fish
linking bd.fish
linking uninstall.fish
linking bd.fish
linking spin.fish
linking spin.fish
linking __z.fish
linking __z_add.fish
linking __z_clean.fish
linking __z_complete.fish
linking uninstall.fish
linking z.fish
linking peco_kill.fish
linking peco_select_history.fish
fetching https://codeload.github.com/fisherman/getopts/tar.gz/master
linking getopts.fish
added 7 packages, removed 7 packages in 4682.35s After |
@arwtyxouymz Hmm. Can you show me the value of the following variables? echo $HOME
echo $XDG_CONFIG_HOME
echo $fisher_config
echo $fisher_cache
echo $fisher_path |
|
@arwtyxouymz The $fisher_* variables will be empty on a new shell, as they are not meant to be used by you. But if you run Start a new shell session and run |
@jethrokuan
|
@arwtyxouymz Intriguing. Can I have your awk and sed versions? Also, does a tilde echo ~
/home/ryutaro |
Yeah, tilde expand to home directory. |
@arwtyxouymz This could be a problem with Can you open your ~/.config/fish/fisher.fish file, go to this line: Lines 228 to 234 in 226c0d9
...and add the following error log: echo ">> URL ($url)" >&2
echo ">> PKG ($pkg)" >&2 If my guess is right, |
@arwtyxouymz Is this you config.fish? Only momentarily, remove these lines and run |
@jethrokuan But after To completely erase z's data, remove:
/home/ryutaro/.local/share/z/data>> URL (https://codeload.github.com/oh-my-fish/theme-bobthefish/tar.gz/master)
>> PKG (github.com/oh-my-fish/theme-bobthefish)
>> URL (https://codeload.github.com/edc/bass/tar.gz/master)
>> PKG (github.com/edc/bass)
>> URL (https://codeload.github.com/0rax/fish-bd/tar.gz/master)
>> PKG (github.com/0rax/fish-bd)
>> URL (https://codeload.github.com/fisherman/spin/tar.gz/master)
>> PKG (github.com/fisherman/spin)
>> URL (https://codeload.github.com/fisherman/z/tar.gz/master)
>> PKG (github.com/fisherman/z)
fetching https://codeload.github.com/oh-my-fish/theme-bobthefish/tar.gz/master
>> URL (https://codeload.github.com/oh-my-fish/plugin-peco/tar.gz/master)
>> PKG (github.com/oh-my-fish/plugin-peco)
fetching https://codeload.github.com/edc/bass/tar.gz/master
fetching https://codeload.github.com/0rax/fish-bd/tar.gz/master
fetching https://codeload.github.com/fisherman/spin/tar.gz/master
fetching https://codeload.github.com/fisherman/z/tar.gz/master
fetching https://codeload.github.com/oh-my-fish/plugin-peco/tar.gz/master
linking __bobthefish_colors.fish
linking __bobthefish_display_colors.fish
linking __bobthefish_glyphs.fish
linking bobthefish_display_colors.fish
linking fish_greeting.fish
linking fish_mode_prompt.fish
linking fish_prompt.fish
linking fish_right_prompt.fish
linking fish_title.fish
linking __bass.py
linking bass.fish
linking bd.fish
linking uninstall.fish
linking bd.fish
linking spin.fish
linking spin.fish
linking __z.fish
linking __z_add.fish
linking __z_clean.fish
linking __z_complete.fish
linking uninstall.fish
linking z.fish
linking peco_kill.fish
linking peco_select_history.fish
>> URL (https://codeload.github.com/fisherman/getopts/tar.gz/master)
>> PKG (github.com/fisherman/getopts)
fetching https://codeload.github.com/fisherman/getopts/tar.gz/master
linking getopts.fish
added 7 packages, removed 7 packages in -2821.75s |
Yeah, but it's my OS X version set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
for file in $XDG_CONFIG_HOME/fish/conf.d/*.fish
buildin source $file 2>/dev/null
end
# tmux
if status is-interactive; and not set -q TMUX
set create_new_session "new"
if tmux ls > /dev/null ^ /dev/null
set IFS
set ID (tmux ls)
set IFS \n" "\t
set ID "$ID\n$create_new_session:"
else
set ID "$create_new_session:"
end
set ID (echo -e $ID | peco | cut -d: -f1)
if test "$ID" = "$create_new_session"
tmux new-session
else if test -n "$ID"
tmux attach -t $ID
else
echo "Start as a normal shell"
end
end
if not functions -q fisher
echo "Installing fisher for the first time..." >&2
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fisher
end
# キーバインディング
function fish_user_key_bindings
bind \cr peco_select_history
end
# cd のあとに ls -a
function cd
builtin cd $argv
ls -a
end
# theme設定
set -g theme_display_git yes
set -g theme_display_git_untracked yes
set -g theme_display_git_master_branch yes
set -g theme_title_use_abbreviated_path no
set -g fish_prompt_pwd_dir_length 0
set -g theme_project_dir_length 0
set -g theme_newline_cursor yes
alias vi nvim
alias vim nvim
# cmakeプロジェクトの初期化
function CppInitialize
mkdir -p ./build/
touch ./CMakeLists.txt
touch ./main.cpp
end
# build
function build
if test -x (command -v clang)
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
if test -x (command -v compdb)
compdb list > ../compile_commands.json
else
echo "\e[33mWarning: compdb is not installed"
end
else
cmake ..
echo "\e[33mWarning: clang is not installed, using default compiler"
end
end And after i delete about tmux line that you specified, the To completely erase z's data, remove:
/home/ryutaro/.local/share/z/data>> URL (https://codeload.github.com/oh-my-fish/theme-bobthefish/tar.gz/master)
>> PKG (github.com/oh-my-fish/theme-bobthefish)
>> URL (https://codeload.github.com/edc/bass/tar.gz/master)
>> PKG (github.com/edc/bass)
>> URL (https://codeload.github.com/0rax/fish-bd/tar.gz/master)
>> PKG (github.com/0rax/fish-bd)
>> URL (https://codeload.github.com/fisherman/spin/tar.gz/master)
>> PKG (github.com/fisherman/spin)
>> URL (https://codeload.github.com/fisherman/z/tar.gz/master)
>> PKG (github.com/fisherman/z)
fetching https://codeload.github.com/oh-my-fish/theme-bobthefish/tar.gz/master
>> URL (https://codeload.github.com/oh-my-fish/plugin-peco/tar.gz/master)
fetching https://codeload.github.com/edc/bass/tar.gz/master
>> PKG (github.com/oh-my-fish/plugin-peco)
fetching https://codeload.github.com/0rax/fish-bd/tar.gz/master
fetching https://codeload.github.com/fisherman/spin/tar.gz/master
fetching https://codeload.github.com/fisherman/z/tar.gz/master
fetching https://codeload.github.com/oh-my-fish/plugin-peco/tar.gz/master
linking __bobthefish_colors.fish
linking __bobthefish_display_colors.fish
linking __bobthefish_glyphs.fish
linking bobthefish_display_colors.fish
linking fish_greeting.fish
linking fish_mode_prompt.fish
linking fish_prompt.fish
linking fish_right_prompt.fish
linking fish_title.fish
linking __bass.py
linking bass.fish
linking bd.fish
linking uninstall.fish
linking bd.fish
linking spin.fish
linking spin.fish
linking __z.fish
linking __z_add.fish
linking __z_clean.fish
linking __z_complete.fish
linking uninstall.fish
linking z.fish
linking peco_kill.fish
linking peco_select_history.fish
>> URL (https://codeload.github.com/fisherman/getopts/tar.gz/master)
>> PKG (github.com/fisherman/getopts)
fetching https://codeload.github.com/fisherman/getopts/tar.gz/master
linking getopts.fish
added 7 packages, removed 7 packages in -2545.74s |
No, it is not. Nothing is run on shell startup. Please read my comment above. And by the way, my GitHub username is: → @jorgebucaran |
I'm so sorry........ |
@arwtyxouymz It looks like The problem is somewhere in this function: Lines 292 to 319 in 226c0d9
|
@arwtyxouymz Fisher is downloading packages to the correct location, but there is obviously a problem during linking. Also, your Can you confirm that ~/.config/fisher/0rax/fish-bd
~/.config/fisher/edc/bass
~/.config/fisher/fisherman/getopts
~/.config/fisher/fisherman/spin
~/.config/fisher/fisherman/z
~/.config/fisher/oh-my-fish/plugin-peco
~/.config/fisher/oh-my-fish/theme-bobthefish |
@arwtyxouymz I'm starting to think this could be a problem with Please run this and show me the output. printf "%s\n" $fisher_config/*/*/* | sed "s|$fisher_config/||;s|github\.com/||" |
Yeah
output is
|
@arwtyxouymz Okay, and what about: printf "%s\n" $fisher_config/*/*/* |
@jorgebucaran /home/ryutaro/.config/fisher/github.com/0rax/fish-bd
/home/ryutaro/.config/fisher/github.com/edc/bass
/home/ryutaro/.config/fisher/github.com/fisherman/getopts
/home/ryutaro/.config/fisher/github.com/fisherman/spin
/home/ryutaro/.config/fisher/github.com/fisherman/z
/home/ryutaro/.config/fisher/github.com/oh-my-fish/plugin-peco
/home/ryutaro/.config/fisher/github.com/oh-my-fish/theme-bobthefish |
@arwtyxouymz The sed command is not producing the right output. Only |
@arwtyxouymz Could you run this please? The following has nothing to do with fisher, we're just testing sed is working like I think it should on your system. echo /home/ryutaro/.config/fisher/github.com/BAR/BAZ | sed "s|/home/ryutaro/.config/fisher/||"
echo /home/ryutaro/.config/fisher/github.com/BAR/BAZ | sed "s|/home/ryutaro/.config/fisher/||;s|github\.com/||" My output is: github.com/BAR/BAZ
BAR/BAZ |
My output is also
|
@arwtyxouymz Try these please: printf "%s\n" $fisher_config/*/*/* | sed "s|/home/ryutaro/.config/fisher/||;s|github\.com/||" printf "%s\n" $fisher_config/*/*/* | sed "s|$fisher_config/||;s|github\.com/||" |
First one is 0rax/fish-bd
edc/bass
fisherman/getopts
fisherman/spin
fisherman/z
oh-my-fish/plugin-peco
oh-my-fish/theme-bobthefish Second is
|
@arwtyxouymz They should have the same output. The value of |
Yes. |
It's sed problem? |
Based on this #462 (comment) it doesn't look like a |
@arwtyxouymz Let's try something simpler: echo $fisher_config | sed "s|$fisher_config||" That should print an empty string. |
@jorgebucaran |
Please confirm also: test $fisher_config = /home/ryutaro/.config/fisher; and echo OK |
Yeah it's OK |
Could it be a problem with multiple lines? What if we echo only one line? echo /home/ryutaro/.config/fisher/github.com/edc/bass | sed "s|$fisher_config/||" Should print github.com/edc/bass |
This command prints github.com/edc/bass correctly. |
One line works. What about multiple lines? printf "%s\n" /home/ryutaro/.config/fisher/github.com/edc/bass /home/ryutaro/.config/fisher/fisherman/z | sed "s|$fisher_config/||" It should be: github.com/edc/bass
fisherman/z |
github.com/edc/bass
fisherman/z is output. |
That's what I expect. Let's see. Printf a glob expansion. printf "%s\n" $fisher_config/*/*/* Then pipe it to sed. printf "%s\n" $fisher_config/*/*/* | sed "s|$fisher_config/||" Then pipe it to sed using multiple replacements. printf "%s\n" $fisher_config/*/*/* | sed "s|$fisher_config/||;s|github\.com/||" I expect. /home/ryutaro/.config/fisher/github.com/0rax/fish-bd
/home/ryutaro/.config/fisher/github.com/edc/bass
/home/ryutaro/.config/fisher/github.com/fisherman/getopts
/home/ryutaro/.config/fisher/github.com/fisherman/spin
/home/ryutaro/.config/fisher/github.com/fisherman/z
/home/ryutaro/.config/fisher/github.com/oh-my-fish/plugin-peco
/home/ryutaro/.config/fisher/github.com/oh-my-fish/theme-bobthefish github.com/0rax/fish-bd
github.com/edc/bass
github.com/fisherman/getopts
github.com/fisherman/spin
github.com/fisherman/z
github.com/oh-my-fish/plugin-peco
github.com/oh-my-fish/theme-bobthefish 0rax/fish-bd
edc/bass
fisherman/getopts
fisherman/spin
fisherman/z
oh-my-fish/plugin-peco
oh-my-fish/theme-bobthefish |
glob expansion: /home/ryutaro/.config/fisher/github.com/0rax/fish-bd
/home/ryutaro/.config/fisher/github.com/edc/bass
/home/ryutaro/.config/fisher/github.com/fisherman/getopts
/home/ryutaro/.config/fisher/github.com/fisherman/spin
/home/ryutaro/.config/fisher/github.com/fisherman/z
/home/ryutaro/.config/fisher/github.com/oh-my-fish/plugin-peco
/home/ryutaro/.config/fisher/github.com/oh-my-fish/theme-bobthefish sed: github.com/0rax/fish-bd
github.com/edc/bass
github.com/fisherman/getopts
github.com/fisherman/spin
github.com/fisherman/z
github.com/oh-my-fish/plugin-peco
github.com/oh-my-fish/theme-bobthefish multiple replacements: 0rax/fish-bd
edc/bass
fisherman/getopts
fisherman/spin
fisherman/z
oh-my-fish/plugin-peco
oh-my-fish/theme-bobthefish |
@arwtyxouymz That's not what you said here in this #462 (comment). |
@arwtyxouymz You are giving me contradictory information. Let's try again. But first to be sure: type _fisher_ls Okay, now, please run and show me your output. echo $fisher_config printf "%s\n" $fisher_config/*/*/* printf "%s\n" $fisher_config/*/*/* | sed "s|$fisher_config/||;s|github\.com/||" for pkg in $fisher_config/*/*/*
command readlink $pkg
and continue
or echo $pkg
end | command sed "s|$fisher_config/||;s|github\.com/||" _fisher_ls fisher ls They all should have the same output. |
I think that's because i changed I didn't think this change cause big difference in sed command. |
@arwtyxouymz Ah, okay that explains the problem. I think I can fix that by making the trailing slash |
@arwtyxouymz Is everything working now? |
First one is # Defined in /home/ryutaro/.config/fish/functions/fisher.fish @ line 82
function _fisher_ls
set -l pkgs $fisher_config/*/*/*
for pkg in $pkgs
command readlink $pkg
and continue
or echo $pkg
end | command sed "s|$fisher_config/||;s|github\.com/||"
end Second one ( 0rax/fish-bd
edc/bass
fisherman/getopts
fisherman/spin
fisherman/z
oh-my-fish/plugin-peco
oh-my-fish/theme-bobthefish Third one (
Forth one (
Fifth one (
|
And plugins are loaded! Thank you so much!!! What was a problem? |
@arwtyxouymz Just to be double sure. Could you run |
Problem was fixed by you changing XDG_CONFIG_HOME from |
Oh Thank you! |
@arwtyxouymz Glad to hear that! BTW I noticed there's an issue with the printed time:
I'll fix that too later. I'll mention your name here when I have released a new version so you can self-update. Thank you for your patience! |
$fisher_config/foo/bar → foo/bar {$fisher_config}foo/bar → foo/bar $fisher_config//foo/bar → foo/bar
@arwtyxouymz Fixed trailing slash error in 3.0.7 2549ac1. 🎉 Update to the latest fisher using:
Cheers! |
Hi,
I use fisher and it's very fantastic plugin manager!
But one problem occur when i'm setting up new laptop.
my problem
When i execute
fisher add .........
command and add plugins to fish shell, the plugins are recognized fish shell.On the other hand, after close the terminal and open new one, fish doesn't recognize them.
why?
I tried login shell and interactive shell, but both are doesn't work.
fisher ls
command returns my plugins.my environment
The text was updated successfully, but these errors were encountered: