English 中文(简体)
自定义zsh sh shell
原标题:Customizing a zsh shell

我试图修改我的终端, 采用 this tr教程

But I can t seem to copy the batchange.py file to my $PATH, I tried cp batchange.py ~/.bin and everything else I can think of.Here is my $PATH: /Users/anthonybrown/.rvm/gems/ruby-1.9.3-p125/bin:/Users/anthonybrown/.rvm/gems‌​/ruby-1.9.3-p125@global/bin:/Users/anthonybrown/.rvm/rubies/ruby-1.9.3-p125/bin:/‌​Users/anthonybrown/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11‌​/bin:/usr/local/git/bin –

最佳回答

< 加固> 将 添加到您的路径:

  1. 首先,我们建立文件夹(如果尚未建立) 。

    mkdir ~/bin
    
  2. batuction. py 复制为 :

    cp batcharge.py ~/bin/batcharge.py
    

    (显然您会想从 < code> battuction. py 脚本所在的位置来做这件事) 。

  3. 检查 是否在您的路径中 :

    echo $PATH | grep ~/bin
    

    这应该带一条直线回来。如果它确实存在的话,我们将加上:

    1. 打开

    2. 在末尾,增加一行:

      export PATH=$PATH:~/bin
      

      这将在您的 $PATH 上添加

    3. 关闭终端窗口并重新打开它。 (或打开新的窗口)。

    4. 类型 echo $PATH \ grep ~/bin 。 现在应该显示一条线( 您应该看到长路径列表结尾处的 {/bin )。

  4. 现在, 我们测试 : 您应该能够输入 < code> what batuction. py 并且看到 < code>\\\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

    /Users/simont/bin/batcharge.py
    

    现在我们可以输入 batuction.py 并看到脚本运行 :)

问题回答

暂无回答




相关问题
2 mysql instances in MAC

i recently switched to mac. first and foremost i installed xampp. then for django-python-mysql connectivity, i "somehow" ended up installing a seperate MySQL. now the seperate mysql installation is ...

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Controlling OSX windows

I m trying to control windows of a foreign OSX applications from my application. I d like to 1. move the windows on the screen 2. resize the windows on the screen 3. change the currently active window ...

Switching J2SE versions on Mac OS (SnowLeopard)

My current JDK on Mac OS (10.6) is set to 1.6 and I d like to switch to 1.5. A listing of /System/Library/Frameworks/JavaVM.framework/Versions/ shows: lrwxr-xr-x 1 root wheel 10 Nov 3 18:34 ...

Scrolling inside Vim in Mac s Terminal

I ve been googling around trying to figure out if it s possible to use my mouse wheel to scroll while inside Vim in Mac s Terminal, with no luck. It seems as if only X11 or iTerm support this. Before ...

export to MP3 from quicktime API

A question for Apple,QT programmers. Would like to know if it s possible to export a Movie object to MP3 using the QuickTime API. Preferably the ConvertMovieToFile function. I ve looked at ...