2

I have a tab open in Google Chrome. Is it possible to get or check it's url from terminal? I am running osx.

Page title will also do.

1 Answer 1

1

You could look into using AppleScript to query chrome for the info if chrome supports it.

I don't have chrome handy, but I would do the following:

  1. open /Applications/Utilities/Script Editor
  2. select Open Dictionary... from the file menu
  3. see if chrome shows up in the list
  4. if it does, select it and look for a command that lists the windows/tabs

Create an Applescript similar to: tell application "chrome" set tabList to the tabs of the front window get the url of the first tab in tabList end tell

and run it with the osascript command in the terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .