def print_filename(to_print, full_pathname)
printed_len = fnprint(to_print)
if (@rl_filename_completion_desired && (@rl_visible_stats || @_rl_complete_mark_directories))
if (to_print != full_pathname)
if full_pathname.nil? || full_pathname.length==0
dn = '/'
else
dn = File.dirname(full_pathname)
end
s = File.expand_path(dn)
if (@rl_directory_completion_hook)
send(@rl_directory_completion_hook,s)
end
slen = s.length
new_full_pathname = s.dup
if (s[-1,1] == '/' )
slen-=1
else
new_full_pathname[slen,1] = '/'
end
new_full_pathname[slen .. -1] = '/' + to_print
if (@rl_visible_stats)
extension_char = stat_char(new_full_pathname)
else
if (path_isdir(new_full_pathname))
extension_char = '/'
end
end
new_full_pathname = nil
else
s = File.expand_path(full_pathname)
if (@rl_visible_stats)
extension_char = stat_char(s)
else
if (path_isdir(s))
extension_char = '/'
end
end
end
s = nil
if (extension_char)
@rl_outstream.write(extension_char)
printed_len+=1
end
end
printed_len
end