Skip to content
/ fzwiki Public

๐Ÿš€ A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly

License

Notifications You must be signed in to change notification settings

sheepla/fzwiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

77 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fzwiki

A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly.

Usage

  1. Run the command by specifying a search query.
  2. Press the <Tab> key to select item(s), then press <Enter> key to confirm the selection.
  3. The pages URL of the selected items will output. If you specify the -o, --open flag, it will open the page in your default browser.

Help message

fzwiki [OPTIONS] QUERY...

Application Options:
  -V, --version  Show version
  -o, --open     Open URL in your web browser
  -l, --lang=    Language for wikipedia.org such as "en", "ja", ...

Help Options:
  -h, --help     Show this help message

Key bindings

Key Description
type some text narrow down candidates
<C-j> / <C-n> move focus down
<C-k> / <C-p> move focus up
<Tab> select the item
<Enter> confirm the selection

Installation

Build from source

git clone https://github.com/sheepla/fzwiki.git
cd fzwiki
go install

Download executable binary

You can download executable binaries from the release page.

Latest Release

Use GitHub release installer tools

These tools make it easy to install executable binaries from GitHub Release.

with ghg:

ghg get sheepla/fzwiki  # Install
ls -l $(ghg bin)/fzwiki # It will exists executable

with relma:

Copy download link URL from Latest Release page, then run below.

relma init                           # Setup
relma install {{DOWNLOAD_LINK_URL}}  # Install
ls -l $(ghg bin)/fzwiki              # It will exists executable

with gh-install

gh install sheepla/fzwiki # Install
ls -l ~/.local/bin/fzwiki # It will exists executable

Configuration

To change the default language for Wikipedia, set a value in the environment variable FZWIKI_LANG .

FZWIKI_LANG="ja" fzwiki ... # --> search from ja.wikipedia.org instead of en.wikipedia.org

To make the setting persistent, add the following line to your rc file of the shell.

  • bash (~/.bashrc) or zsh (~/.zshrc):
export FZWIKI_LANG="ja"
  • fish (~/.config/fish/config.fish):
set -Ux FZWIKI_LANG ja

LICENSE

MIT

Contributing

Welcome! ๐Ÿ’•

Author

Sheepla

About

๐Ÿš€ A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •