gpt4 book ai didi

debugging - 如何将 Pry 提示设置为当前时间戳?

转载 作者:行者123 更新时间:2023-12-02 21:32:15 26 4
gpt4 key购买 nike

当我将以下行放入 ~/.pryrc 中时,它无法按预期工作:

Pry.config.prompt_name = Time.now.to_s

每次提示都等于 Pry 启动的时间。

每次显示提示时(每次调用后),如何使用当前时间戳更新提示?

最佳答案

您需要使用prompt而不是prompt_name

Pry.config.prompt = Proc.new { |output, value| Time.now.to_s[0..-6] } 

关于debugging - 如何将 Pry 提示设置为当前时间戳?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22084481/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com