17

I just updated my xcode command line tool in my iTerm2 and it seems like I need to restart my iTerm to put that to work, since when I try to use

tns build ios

command to build my nativescript project for iOS, it always echos back

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

which shouldn't be true. However, I am having a session that's currently running to upload a huge file to my cloud drive which has spent 7 hours to have uploaded 37%, and it doesn't support resume uploading from a break-point.

So, is there any way to refresh the terminal without closing the active session?

Thanks guys

Hang Chen
  • 549
  • 1
  • 7
  • 18

3 Answers3

17

Not trying to steal answers here. But the answer is in the comment by @BillyChen

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

It depends on what shell you're using to pick up the proper profile. Some use a common .profile as well

source ~/.profile
Dylan Wright
  • 1,118
  • 12
  • 19
3

This seems to work for me

source ~/.zshrc
Hellodan
  • 1,158
  • 4
  • 18
  • 38
-1

To completely clear the iterm2 terminal (in case you're using that esp. in Ventura), I only see Edit -> Clear Buffer (cmd+k).

The control+L only does the equivalent of a clear which doesn't help me most of the time since I may have to run a command with long output and want only that output in the terminal buffer.

Harlin
  • 1,059
  • 14
  • 18