22
我正在關注名爲pry的紅寶石上的screen cast。在8點10分,使用.tree命令,我相信這是一個Unix命令。osx bash上的樹命令
它似乎並沒有被工作我的系統上:
[24] pry(main)> .tree
\Error: there was a problem executing system command: tree
,我已經查明問題here,其中撬引用shell命令:從上下文
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
這看起來很難非常有用,我怎麼能得到這個命令?