在终端使用subl命令的问题:;命令未找到与QUOT" &安培; "没有这样的文件或目录" [英] Problems using subl command in terminal: "Command not found" & "No such file or directory"

查看:1020
本文介绍了在终端使用subl命令的问题:;命令未找到与QUOT" &安培; "没有这样的文件或目录"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要提前道歉,这是一个新手的问​​题!我花了近2小时,试图找到一个解决方案。

I want to apologize in advance that this is a newbie question! I've spent the last 2 hours trying to find a solution.

我有两个问题(我敢肯定,相关)。

I have two problems (I'm sure related).

背景:

这是我的$ PATH如下:

This is what my $PATH looks like:

/Users/Sponsi/.rvm/gems/ruby-1.9.3-p194/bin:/Users/Sponsi/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/Sponsi/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/Sponsi/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

/Users/Sponsi/.rvm/gems/ruby-1.9.3-p194/bin:/Users/Sponsi/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/Sponsi/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/Sponsi/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

问题1

我试图使用命令行命令subl在OSX推出崇高文字2

I am trying to use the command-line command "subl" to launch Sublime Text 2 on OSX.

我输入下面的命令:
LN -s/应用/崇高文字2.app/Contents/SharedSupport/bin/subl〜/斌/ subl

它只是一半的工作 - 当我输入subl我得到未找到命令。但是它上面说,当我重新输入命令已经存在。

It only halfway worked - when I enter "subl" I get "Command not found". But when I re-enter the command above it says "Already exists."

我在网上搜索,发现一个(有点)修复。我增加了以下我的.bashrc:

I searched online and found a (somewhat) fix. I added the following to my .bashrc:

echo 'export PATH="./bin:$PATH"' >> ~/.bashrc 
source ~/.bashrc

使用命令subl的工作,但只是暂时的。如果我退出终端或切换到另一个它停止工作目录(把我带到问题#2,见下文)。

Using the command "subl" does work but only temporarily. If I exit terminal or switch to another directory it stops working (bringing me into problem #2, see below.)

问题2:

当我尝试使用命令拉起另一个目录下的文件subl我得到-bash:./bin/subl:没有这样的文件或目录。我确认我想编辑确实存在文件

When I try to pull up a file under another directory using the command "subl" I get "-bash: ./bin/subl: No such file or directory" I confirmed the file I want to edit does exist.

顺便说一句,我下面发现了Ruby教程@ <一个href=\"http://ruby.railstutorial.org/ruby-on-rails-tutorial-book\">http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

BTW, I am following the Ruby tutorial found @ http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

感谢你这么多的时间!

推荐答案

如果您使用的是RVM,做到这一点:

if you are using RVM, do this:

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/.rvm/bin/subl

这篇关于在终端使用subl命令的问题:;命令未找到与QUOT&QUOT; &安培; &QUOT;没有这样的文件或目录&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆