aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeposite Pirate2026-02-12 02:01:38 +0100
committerDeposite Pirate2026-02-12 02:01:38 +0100
commitfad2f5a2474c968ac448184d6808ee4268c4bbe9 (patch)
tree29474a70d1e2f41c6352974b3d44323749e62659
parent54de850ddf7752c36dfbfbd9f9cfe96b612322d9 (diff)
Make fishupd a function and allow overriding repo
modified: conf.d/02platform.fish new file: functions/fishupd.fish
-rw-r--r--conf.d/02platform.fish4
-rw-r--r--functions/fishupd.fish16
2 files changed, 16 insertions, 4 deletions
diff --git a/conf.d/02platform.fish b/conf.d/02platform.fish
index 46bf97d..5cbc4cb 100644
--- a/conf.d/02platform.fish
+++ b/conf.d/02platform.fish
@@ -350,10 +350,6 @@ if status is-interactive
alias_if doas sudo
- if command -sq git
- alias fishupd 'pushd ~/.config/fish ; git pull ; popd'
- end
-
# process viewer to look for by order of preference
set topprg 'htop' 'btop'
set found_topprg (find_prog $topprg)
diff --git a/functions/fishupd.fish b/functions/fishupd.fish
new file mode 100644
index 0000000..3e244d1
--- /dev/null
+++ b/functions/fishupd.fish
@@ -0,0 +1,16 @@
+function fishupd --description "Update fish configuration"
+
+if not command -q 'git'
+ echo "Can't find git."
+ return 1
+end
+
+pushd "$__fish_config_dir"
+ if test -z "$FISHCFGREPO"
+ git pull
+ else
+ git pull "$FISHCFGREPO"
+ end
+popd
+
+end