【问题标题】:Is there a way to "refresh" the terminal/iTerm without closing the current sessions?有没有办法在不关闭当前会话的情况下“刷新”终端/iTerm?
【发布时间】:2018-06-15 01:14:10
【问题描述】:

我刚刚在我的 iTerm2 中更新了我的 xcode 命令行工具,我似乎需要重新启动我的 iTerm 才能让它工作,因为当我尝试使用时

tns build ios

为 iOS 构建我的 nativescript 项目的命令,它总是回显

xcodebuild execution failed. Make sure that you have latest Xcode and tools installed.

这不应该是真的。 但是,我正在运行一个会话,该会话正在将一个巨大的文件上传到我的云驱动器,该文件花费了 7 个小时才上传了 37%,并且它不支持从断点继续上传。

那么,有什么方法可以在不关闭活动会话的情况下刷新终端?

谢谢大家

【问题讨论】:

  • 也许ctrl + L ?
  • @nbari 谢谢,我认为这只是清除屏幕,但我还是尝试了。没用...
  • 有什么解决办法吗?我的 php 代码也有同样的问题
  • @Shiro 也许尝试像source ~/.bash_profile 一样获取您的个人资料文件。后来我发现它可能会刷新环境。看看是否有效
  • er..source其实和restart一样,有点不方便,我以前的iTerms没有这个问题。

标签: terminal nativescript iterm


【解决方案1】:

不要试图在这里窃取答案。但答案在@BillyChen 的评论中

source ~/.bash_profile
source ~/.zsh_profile or source ~/.zshrc

这取决于您使用什么外壳来获取正确的配置文件。有些也使用通用的 .profile

source ~/.profile

【讨论】:

    猜你喜欢
    • 2022-07-22
    • 2021-12-28
    • 1970-01-01
    • 2013-02-18
    • 2015-04-25
    • 2014-09-20
    • 2014-11-02
    • 1970-01-01
    • 2020-08-29
    相关资源
    最近更新 更多