-
-
Couldn't load subscription status.
- Fork 306
Third party integration
buku waits until its input is closed when not started in a tty. For example, the following hangs:
$ cat | buku
This is the intended behavior as the primary reason behind supporting piped input is to add bookmarks with a keyboard shortcut. Third-party applications should explicitly close the input stream or use a wrapper script like the following one:
#!/bin/bash
echo $1 | buku -a
fzf can be used for as you type searching and opening of bookmarks. Multiple bookmarks can be selected with tab (enter to open). Install fzf and place this function in ~/.bashrc
fb() {
# save newline separated string into an array
mapfile -t website <<< "$(buku -p -f 5 | column -ts$'\t' | fzf --multi)"
# open each website
for i in "${website[@]}"; do
index="$(echo "$i" | awk '{print $1}')"
buku -p "$index"
buku -o "$index"
done
}cmder creates HOME variable in init.bat when it starts.
buku sets its database path according to existence of HOME variable, which is not defined by default on Windows. For using related projects like bukubrow, bukubrow-host the bookmark database should be in the standard path, which rely on non-presence of HOME variable in windows.
For using buku it's required to set HOME= in %cmder_root%/config/user_profile.cmd as was suggested by cmder developers.