22
나는 pry이라는 루비 보석에 screen cast을 팔로우하고 있습니다. 8시 10 분에 .tree 명령이 사용됩니다.이 명령은 유닉스 명령입니다.osx bash에서 tree 명령
그것은 내 시스템에서 작동하는 것으로 나타나지 않습니다
[24] pry(main)> .tree
\Error: there was a problem executing system command: tree
내가하는 참조에게 쉘 명령 올립니다, here에 문제를 추적 한 :의 맥락에서
Pry::CommandSet.new do
command(/\.(.*)/, "All text following a '.' is forwarded to the shell.", :listing => ".<shell command>") do |cmd|
if cmd =~ /^cd\s+(.+)/i
dest = $1
begin
Dir.chdir File.expand_path(dest)
rescue Errno::ENOENT
output.puts "No such directory: #{dest}"
end
else
if !system(cmd)
output.puts "Error: there was a problem executing system command: #{cmd}"
end
end
end
을 bash 나는 행운과 명령 트리를 사용하여 시도 :
projects/sms(apps2)$ tree
-bash: tree: command not found
~/projects/sms(apps2)$ .tree
-bash: .tree: command not found
이것은 incred 보이는 유용하게 사용할 수있는 방법은 무엇입니까? macports 사용
brew install tree
: homebrew를 사용