aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-02-08 19:38:12 +0500
committerAnton Bobov <anton@bobov.name>2024-02-08 19:38:12 +0500
commit7652c45609757b7aa5541dc0ae156333366d5cd4 (patch)
tree09b0bd6253d73f9125df5f528525cf4a5fda1d92
parent727e75a26120c8b56e93c7319281cbfc84d63a8b (diff)
[eget] Add local eget config
-rw-r--r--files/.eget.toml34
-rw-r--r--files/.zsh/rc/S20_eget15
2 files changed, 20 insertions, 29 deletions
diff --git a/files/.eget.toml b/files/.eget.toml
index 9dd0be4..57a9d39 100644
--- a/files/.eget.toml
+++ b/files/.eget.toml
@@ -2,41 +2,17 @@
target = "~/.local/bin"
upgrade_only = true
-["rclone/rclone"]
-asset_filters = [ "zip" ]
-
-["restic/restic"]
-
+# Easily install prebuilt binaries from GitHub.
["zyedidia/eget"]
-["antonmedv/fx"]
-
-["mikefarah/yq"]
-asset_filters = [ "tar.gz" ]
-file = "yq_linux_amd64"
-target = "~/.local/bin/yq"
-
+# n³ The unorthodox terminal file manager
["jarun/nnn"]
asset_filters = [ "nnn-nerd-static" ]
target = "~/.local/bin/nnn"
-["docker/compose"]
-target = "~/.local/bin/docker-compose"
-
-["jesseduffield/lazygit"]
-
-["sharkdp/bat"]
-asset_filters = [ "linux-gnu.tar.gz" ]
-
-["pypa/pipx"]
-
-["akavel/up"]
-asset_filters = [ "up" ]
-
-["so-fancy/diff-so-fancy"]
-
+# A shell parser, formatter, and interpreter with bash support; includes shfmt
["mvdan/sh"]
target = "~/.local/bin/shfmt"
-["Wilfred/difftastic"]
-asset_filters = [ "linux-gnu.tar.gz" ]
+# Good-lookin' diffs. Actually… nah… The best-lookin' diffs. 🎉
+["so-fancy/diff-so-fancy"]
diff --git a/files/.zsh/rc/S20_eget b/files/.zsh/rc/S20_eget
index 0a0aa26..cdd9713 100644
--- a/files/.zsh/rc/S20_eget
+++ b/files/.zsh/rc/S20_eget
@@ -1,5 +1,20 @@
function () {
__EGET_LOCATION="$HOME/.local/bin/eget"
+ __EGET_CONFIG="$HOME/.eget.toml"
+ __EGET_CONFIG_LOCAL="$HOME/.eget.local.toml"
+
+ if [ -x "$__EGET_LOCATION" ] ; then
+ function eget() {
+ config="$__EGET_CONFIG"
+ if [ -f "$__EGET_CONFIG_LOCAL" ] ; then
+ config=$(mktemp -t eget.config.XXXXX --suffix .toml)
+ trap "rm '$config'" EXIT
+ cat "$__EGET_CONFIG" "$__EGET_CONFIG_LOCAL" >"$config" 2>/dev/null
+ fi
+
+ (export EGET_CONFIG="$config" && "$__EGET_LOCATION" "$@")
+ }
+ fi
if [ ! -x "$__EGET_LOCATION" ] ; then
function eget() {