lib/textbringer/commands/files.rb in textbringer-0.3.0 vs lib/textbringer/commands/files.rb in textbringer-0.3.1
- old
+ new
@@ -120,10 +120,10 @@
message(Dir.pwd)
end
define_command(:chdir, doc: "Change the current working directory.") do
|dir_name = read_file_name("Change directory: ",
- default: Buffer.current.file_name &&
+ default: Buffer.current.file_name &&
File.dirname(Buffer.current.file_name))|
Dir.chdir(dir_name)
end
end
end