晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
| DIR:/proc/thread-self/root/proc/thread-self/root/opt/alt/ruby34/share/ruby/reline/io/ |
| Current File : //proc/thread-self/root/proc/thread-self/root/opt/alt/ruby34/share/ruby/reline/io/dumb.rb |
require 'io/wait'
class Reline::Dumb < Reline::IO
RESET_COLOR = '' # Do not send color reset sequence
attr_writer :output
def initialize(encoding: nil)
@input = STDIN
@output = STDOUT
@buf = []
@pasting = false
@encoding = encoding
@screen_size = [24, 80]
end
def dumb?
true
end
def encoding
if @encoding
@encoding
elsif RUBY_PLATFORM =~ /mswin|mingw/
Encoding::UTF_8
else
@input.external_encoding || Encoding.default_external
end
rescue IOError
# STDIN.external_encoding raises IOError in Ruby <= 3.0 when STDIN is closed
Encoding.default_external
end
def set_default_key_bindings(_)
end
def input=(val)
@input = val
end
def with_raw_input
yield
end
def write(string)
@output.write(string)
end
def buffered_output
yield
end
def getc(_timeout_second)
unless @buf.empty?
return @buf.shift
end
c = nil
loop do
Reline.core.line_editor.handle_signal
result = @input.wait_readable(0.1)
next if result.nil?
c = @input.read(1)
break
end
c&.ord
end
def ungetc(c)
@buf.unshift(c)
end
def get_screen_size
@screen_size
end
def cursor_pos
Reline::CursorPos.new(0, 0)
end
def hide_cursor
end
def show_cursor
end
def move_cursor_column(val)
end
def move_cursor_up(val)
end
def move_cursor_down(val)
end
def erase_after_cursor
end
def scroll_down(val)
end
def clear_screen
end
def set_screen_size(rows, columns)
@screen_size = [rows, columns]
end
def set_winch_handler(&handler)
end
def in_pasting?
@pasting
end
def prep
end
def deprep(otio)
end
end
|