danhper / fundle

A minimalist package manager for fish shell
MIT License
376 stars 22 forks source link

failed on Mac OS? #4

Closed rainchen closed 8 years ago

rainchen commented 8 years ago

when running fundle init, I got these error messages:

fish: Unknown command '__fundle_plugin_path'
Standard input: __fundle_plugin_path $plugin
                ^
in command substitution
    called on standard input,

in command substitution
    called on standard input,

in function '__fundle_init',
    called on line 223 of file '/Users/rain/.config/fish/functions/fundle.fish',
    with parameter list ''

in function 'fundle',
    called on standard input,
    with parameter list 'init'

find: illegal option -- m
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

looks like the find command does not support m option, my os is MacOS 10.9.5 ~> find -m

find: illegal option -- m
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

any idea?

danhper commented 8 years ago

Hi, thanks for reporting. I usually work on Linux so it is very possible that some command is not compatible. I'm going to grab a mac and check this.

danhper commented 8 years ago

@rainchen What version of fish are you using? I just tried on OS X and it seems to fail with 2.1.2 but to work on 2.2.0. I think the key change is

A new "top-level" local scope has been added, allowing local variables declared on the commandline to be visible to subsequent commands. (#206)

If you are using an old version, please try to upgrade. If you are using brew, brew update && brew upgrade fish should do it.

rainchen commented 8 years ago

I'm using 2.1.1, I will try to upgrade fish to 2.2.0 later. Currently I comment out these lines in the bundle.fish and it's working:

        # HACK: `__fundle_plugin_path $plugin` will raise error as `fish: Unknown command '__fundle_plugin_path'`
        # read all *.fish files if no init.fish found
        # for f in (find (__fundle_plugin_path $plugin) -maxdepth 1 -iname "*.fish")
        #   source $f
        # end
danhper commented 8 years ago

@rainchen I modified the init function a little and it worked for me with fish 2.1.1. Let me know if you still have issues.

rainchen commented 8 years ago

@tuvistavie I upgraded fish to v2.2.0 and also update fundle to latest version, everything works fine now, thanks for the quick response.

danhper commented 8 years ago

Great, thanks for the feedback.