HTML 문서를 생성하는 프로그램이 있습니다. 스크립트가 끝나면 open
명령을 사용 하여 브라우저에서 페이지를 자동으로 봅니다.
generate-document > index.html
open index.html
그러나 코드를 반복 한 후 index.html
브라우저에서 사용되지 않는 수많은 사본이 생깁니다.
"index.html을 이미보고있는 경우 새로 고치거나로드하지 않으면"과 같은 방법이 있습니까 (명령 줄 또는 브라우저 내에서)?
generate-document > index.html
open-or-reload index.html
Safari 또는 Chrome 고유의 방법이 좋습니다.
좋은. 이것을 답변으로 추가하면 투표하겠습니다.
—
마크 해리슨
osascript -e "tell application \"Safari\" to set sameURL to URL of current tab of front window" -e "tell application \"Safari\" to set URL of current tab of front window to sameURL"