Estoy siguiendo un screen cast en una gema de rubí llamada pry. A las 8:10, se usa el comando .tree, que creo que es un comando de Unix.comando de árbol en osx bash
No parece estar funcionando en mi sistema:
[24] pry(main)> .tree
\Error: there was a problem executing system command: tree
y he rastreado la cuestión de here, en el que hacer palanca hace referencia a un comando 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
del contexto de bash He intentado utilizar el árbol de comandos sin suerte:
projects/sms(apps2)$ tree
-bash: tree: command not found
~/projects/sms(apps2)$ .tree
-bash: .tree: command not found
Esto se ve increíble muy útil, ¿cómo puedo obtener este comando?