Search-as-you-type cli frontend for the buku bookmarks manager using peco with fish language.
Find a file
2025-10-26 20:07:14 +01:00
src refactor: rewrite oil in fish shell with improved build system Complete rewrite of the oil bookmark manager from bash to fish shell, modernizing the codebase and improving maintainability. Changes: - Rewrite main script from bash to fish shell syntax - Replace getopt with fish's native argparse for flag parsing - Convert all bash functions to fish function syntax - Use fish string manipulation builtins instead of bash parameter expansion - Replace xsel with wl-paste for Wayland clipboard support - Add BROWSER environment variable check with xdg-open fallback Build system improvements: - Add local build target for development (builds to ./build/) - Add system-wide install target with configurable PREFIX - Add fish shell completions that install with the package - Fix LIBDIR resolution for both local and installed contexts - Add clean target to remove build artifacts PKGBUILD updates: - Update dependencies: bash→fish, add gawk, peco, buku, wl-clipboard - Fix indentation to use consistent 4-space indent - Add PREFIX=/usr to install command for proper system paths This rewrite maintains full feature compatibility while providing better integration with modern fish shell conventions and Wayland environments. 2025-10-26 20:03:09 +01:00
.gitignore refactor: rewrite oil in fish shell with improved build system Complete rewrite of the oil bookmark manager from bash to fish shell, modernizing the codebase and improving maintainability. Changes: - Rewrite main script from bash to fish shell syntax - Replace getopt with fish's native argparse for flag parsing - Convert all bash functions to fish function syntax - Use fish string manipulation builtins instead of bash parameter expansion - Replace xsel with wl-paste for Wayland clipboard support - Add BROWSER environment variable check with xdg-open fallback Build system improvements: - Add local build target for development (builds to ./build/) - Add system-wide install target with configurable PREFIX - Add fish shell completions that install with the package - Fix LIBDIR resolution for both local and installed contexts - Add clean target to remove build artifacts PKGBUILD updates: - Update dependencies: bash→fish, add gawk, peco, buku, wl-clipboard - Fix indentation to use consistent 4-space indent - Add PREFIX=/usr to install command for proper system paths This rewrite maintains full feature compatibility while providing better integration with modern fish shell conventions and Wayland environments. 2025-10-26 20:03:09 +01:00
LICENSE Change License MIT->GPL3 2016-12-08 00:49:16 +01:00
Makefile refactor: rewrite oil in fish shell with improved build system Complete rewrite of the oil bookmark manager from bash to fish shell, modernizing the codebase and improving maintainability. Changes: - Rewrite main script from bash to fish shell syntax - Replace getopt with fish's native argparse for flag parsing - Convert all bash functions to fish function syntax - Use fish string manipulation builtins instead of bash parameter expansion - Replace xsel with wl-paste for Wayland clipboard support - Add BROWSER environment variable check with xdg-open fallback Build system improvements: - Add local build target for development (builds to ./build/) - Add system-wide install target with configurable PREFIX - Add fish shell completions that install with the package - Fix LIBDIR resolution for both local and installed contexts - Add clean target to remove build artifacts PKGBUILD updates: - Update dependencies: bash→fish, add gawk, peco, buku, wl-clipboard - Fix indentation to use consistent 4-space indent - Add PREFIX=/usr to install command for proper system paths This rewrite maintains full feature compatibility while providing better integration with modern fish shell conventions and Wayland environments. 2025-10-26 20:03:09 +01:00
README.md hotfix(es) 2025-10-26 20:07:14 +01:00

oil

Search-as-you-type cli frontend for the buku bookmarks manager using peco. It runs on Linux and inside your favourite terminal emulator.

features

  • View a list of your (buku managed) bookmarks and their tags and titles in your terminal
  • While typing, have the list instantaneously filtered accordingly
  • After selecting one (hit Enter) or multiple bookmarks (read below), have them opened in your browser
  • Tag-Mode: After selecting the bookmarks, get prompted for a tag and have it applied to all of them
  • Title-Mode: After selecting the bookmarks, get prompted for a new title for each one
  • Delete-Mode: After selecting the bookmarks, delete each one
  • Add a URL from clipboard to your bookmarks

basic usage

usage: oil [OPTIONS]
    by default, selected bookmarks get openend using the default browser

options:
  -t, --tag
            run in tag-mode (see features)
  -T, --title
            run in title-mode (see features)
  -d, --delete
            run in delete-mode (see features)
  -a, --add
            add a bookmark from clipboard
  -p, --no-peco-reconfiguration
            do not overwrite the users peco configuration (see section about multiline selection)

  Note: Mind that the four modes are mutually exclusive. If more than one is specified it could
  cause all sorts of mayhem, who knows (the last one applies, but please don't).

installation

After cloning this repository, make sure the listed dependencies are installed, navigate to it's directory and run make install. After that, your terminal should respond very kindly to the command oil and as soon as that one gets going you are free as a bird to just start typing away and hit enter when you found what you were looking for (the latter being great life advice, too).

Note: Packages for specific linux distributions are not published as of yet since this makes sense only after the user base is of order "3 people or more". However, if you are using Arch-Linux and want this package to be tracked by its package manager you can build and install a package manually. For this purpose a file named PKGBUILD resides in the misc/ directory. If you run makepkg inside a direcory where this file is located, a proper Arch-Linux package will be assembled there. The generated package file can then be installed using sudo pacman -U <generated-package-file>.

Feel free, though, to write me an issue requesting a package for your distro. And if you know what you are doing, I hereby grant you permission to take matters into your own hands and publish one yourself. Godspeed.

multiline selection

This is a feature of peco that is not enabled by default. Anticipating that most users will not already be using peco but will want to use the feature and not drudge through a bunch of configuration options, oil enables it by default by passing a custom configuration file to peco. This leads to the users configuration being overruled. Should you want to use your own peco config, disable this behaviour via the flags oil -p or, equivalently, oil --no-peco-reconfiguration

In case you choose to do this but do not have multiline selection enabled in your peco config, read up on the configuration section of peco and amend your config with something like

    {
        ...
        "StickySelection": true,
        "Action": {
            "selectAndMoveDown": [
                "peco.ToggleSelection",
                "peco.SelectDown"
            ]
        },
        "Keymap": {
            "C-Space": "selectAndMoveDown",
            "ArrowLeft": "peco.ScrollLeft",
            "ArrowRight": "peco.ScrollRight"
        }
        ...
    }

This makes it so you can hit Ctrl+Space a bunch of times and select a number of bookmarks quickly and, additionally, use the left and right arrows to scroll to the left and right. Note: Selections persist through changes in the search term.

dependencies

  • buku
  • peco
  • jq
  • getopt - used to parse command line arguments, this is listed for the sake of completeness, it should already be present on your system