Giter Club home page Giter Club logo

Comments (18)

wlin114 avatar wlin114 commented on August 22, 2024 3

@Strandbummler I found out that my PATH is in .bash_profile not .profile

So I changed @blahah 's command to echo "export PATH=\$PATH:/usr/local/m-cli" >> ~/.bash_profile

Now m works perfectly for me :) hope this helps

from m-cli.

rgcr avatar rgcr commented on August 22, 2024 3

@jameshalsall I think it's a good idea, I've changed this in the latest commit.

from m-cli.

rgcr avatar rgcr commented on August 22, 2024 2

@Strandbummler are you still getting this error? try to install the tool again I've made some changes and now it's not required export the path in your profile, It creates a file automatically in /etc/paths.d/m-cli

from m-cli.

blahah avatar blahah commented on August 22, 2024 1

you need to add the install location to your PATH:

If you use bash:

echo "export PATH=\$PATH:/usr/local/m-cli" >> ~/.profile

or if you use zsh:

echo "export PATH=\$PATH:/usr/local/m-cli" >> ~/.zshrc

then open a new terminal, and m should be found.

edit: added missing \ to both commands

from m-cli.

scottosmith avatar scottosmith commented on August 22, 2024 1

Just a friendly reminder, make sure you open a new terminal window after these changes. It won't take effect if you haven't yet.

from m-cli.

moyaja avatar moyaja commented on August 22, 2024

Having the exact same issue.
macOS 10.11.5
using Terminal

from m-cli.

Strandbummler avatar Strandbummler commented on August 22, 2024

path was added successfully, no change. still won't work... :( (bash)

from m-cli.

blahah avatar blahah commented on August 22, 2024

What's the output of ls -alh /usr/local/m-cli ?

from m-cli.

Strandbummler avatar Strandbummler commented on August 22, 2024

USER@HOST:~$ ls -alh /usr/local/m-cli
total 56
drwxr-xr-x 10 user wheel 340B 15 Jul 11:58 .
drwxr-xr-x 21 user wheel 714B 15 Jul 11:58 ..
drwxr-xr-x 16 user wheel 544B 15 Jul 12:07 .git
-rw-r--r-- 1 user wheel 16B 15 Jul 11:58 .gitignore
-rw-r--r-- 1 user wheel 1,1K 15 Jul 11:58 LICENSE.md
-rw-r--r-- 1 user wheel 10K 15 Jul 11:58 Readme.md
-rwxr-xr-x 1 user wheel 1,7K 15 Jul 11:58 install.sh
drwxr-xr-x 4 user wheel 136B 15 Jul 11:58 lib
-rwxr-xr-x 1 user wheel 887B 15 Jul 11:58 m
drwxr-xr-x 27 user wheel 918B 15 Jul 11:58 plugins

everything is there, i guess

from m-cli.

theothermattm avatar theothermattm commented on August 22, 2024

Having the same issue with the path. However, when I copy the main script with a name of "m-cli" everything works well. See the output below. I'm on OSX 10.11.5.

mymac:~ myuser$ ls -alh /usr/local/m-cli/
total 64
drwxr-xr-x  11 myuser  admin   374B Jul 15 08:50 .
drwxr-xr-x  23 myuser  admin   782B Jul 15 08:43 ..
drwxr-xr-x  13 myuser  admin   442B Jul 15 08:43 .git
-rw-r--r--   1 myuser  admin    16B Jul 15 08:43 .gitignore
-rw-r--r--   1 myuser  admin   1.1K Jul 15 08:43 LICENSE.md
-rw-r--r--   1 myuser  admin    10K Jul 15 08:43 Readme.md
-rwxr-xr-x   1 myuser  admin   1.7K Jul 15 08:43 install.sh
drwxr-xr-x   4 myuser  admin   136B Jul 15 08:43 lib
-rwxr-xr-x   1 myuser  admin   887B Jul 15 08:43 m
-rwxr-xr-x   1 myuser  admin   887B Jul 15 08:50 m-cli
drwxr-xr-x  27 myuser  admin   918B Jul 15 08:43 plugins
mymac:~ myuser$ m battery status
battery: No such file or directory
status: No such file or directory
mymac:~ myuser$ m-cli battery status
Now drawing from 'AC Power'
 -InternalBattery-0     100%; charged; 0:00 remaining present: true 

Update: Even if I rename the main script to "mc" it works. Seems to be an issue with the one character script name and the path.

from m-cli.

blahah avatar blahah commented on August 22, 2024

@Strandbummler OK, so the only other obvious place is the PATH. Output of echo $PATH ?

from m-cli.

Strandbummler avatar Strandbummler commented on August 22, 2024

USER@HOST:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin

i think we are getting somewhere, but in ~/.profile it says:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/usr/local/m-cli

from m-cli.

carambito avatar carambito commented on August 22, 2024

I got mine to work though this is not as nice. After installing, I moved the whole directory from the usr/local to User/USER/ and renamed it to '.m-cli'. Then I went into my .profile and edited the path to be User/USER/.m-cli.

from m-cli.

blahah avatar blahah commented on August 22, 2024

@Strandbummler I apologise for my typo in the echo command - there should be a \ before $PATH (I've fixed it above now). I recommend deleting that line from ~/.profile and then re-running the fixed echo command above.

However, this doesn't explain your issue. As @scottosmith says the changes only take affect when the terminal session starts. If you open a new terminal window and run echo $PATH && which m what do you get?

from m-cli.

emaxon avatar emaxon commented on August 22, 2024

@wlin114 solution worked for me.

from m-cli.

rgcr avatar rgcr commented on August 22, 2024

I'm going to close this issue as there is no new news

from m-cli.

jameshalsall avatar jameshalsall commented on August 22, 2024

@rgcr can we not create a symlink for /usr/local/m-cli/m into /usr/local/bin in the install.sh? This would alleviate any path issues people have post-install.

from m-cli.

Strandbummler avatar Strandbummler commented on August 22, 2024

Since i started the topic, I just wanted to let you know that it works now, at least for me :) Thanks for the effort. I really appreciate it, keep up the good work.

from m-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.