open

command module
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 1 Imported by: 0

README

Open

open url in browser.

go install github.com/fzdwx/open@latest 

about auth

  1. use gh cli: gh auth login
  2. or export GH_TOKEN=xxx

use case

# open url
open https://github.com
open https://google.com

# open the specified url
open url https://www.bilibili.com/

# open dir
open .
open /home/fzdwx

# open github.com
open gh

# open https://github.com/search?q=fzdwx
open gh fzdwx

# open https://github.com/search?q=golang
open gh golang

# open https://github.com/search?q=sky&l=java
open gh -l java sky

# open https://github.com/search?q=fzdwx
open gh -l java sky

# open your github profile
open gh profile
open gh p

# open current project git remote url  in browser. https://github.com/fzdwx/open
open gh repo

# open https://github.com/fzdwx/open
open gh repo fzdwx/open
# open # https://github.com/{username}/open`,
open gh repo open

# preview logfile
open log

config (env)

GH_TOKEN=xxx
OPEN_PREVIEW=bat(fallback to cat)

RodeMap

  • read url from stdin. eg: echo https://github.com/search?q=fzdwx | open
  • history
    • history record
    • history view
  • custom alias

Documentation

Overview

Copyright © 2022 fzdwx <likelovec@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis
cmd
gh
log
url
internal
env

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL