travis-g / bang

Browser launching inspired by DuckDuckGo's !bangs
MIT License
0 stars 0 forks source link

[Feature Request] Read from stdin #7

Closed smhmd closed 4 years ago

smhmd commented 4 years ago

Problem I'm trying to make a dmenu script (I can make a script out of the current implementation, but not comfy one-liners).

Being able to type the bang with the search is better than going through two menus, IMO.

Proposal

$ echo b search term | bang - # translates to bang b search term
travis-g commented 4 years ago

Totally doable, basically if fs.Arg(0) is a hyphen, it'd use os.Stdin in place of fs.Args(). I should be able to add this within the day or so. Thanks for the suggestion!