summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2023-08-22 07:10:29 +0200
committerAlan Pearce2023-08-22 18:47:27 +0200
commit4a22fe0cf6b7c54d67dbf7c45d82fb8d7f330bbf (patch)
tree42c1352d04b8617f8f8c9075f21885a4728d4beb /user
parentb2f6bba3116bdb32e33c1656b0a7865b6ce99719 (diff)
downloadnixfiles-4a22fe0cf6b7c54d67dbf7c45d82fb8d7f330bbf.tar.lz
nixfiles-4a22fe0cf6b7c54d67dbf7c45d82fb8d7f330bbf.tar.zst
nixfiles-4a22fe0cf6b7c54d67dbf7c45d82fb8d7f330bbf.zip
Add fish completions
Diffstat (limited to 'user')
-rw-r--r--user/settings/fish.nix4
-rw-r--r--user/settings/fish/completions/ecpenv.fish1
-rw-r--r--user/settings/fish/completions/esetenv.fish1
3 files changed, 6 insertions, 0 deletions
diff --git a/user/settings/fish.nix b/user/settings/fish.nix
index db3b474a..b548c71c 100644
--- a/user/settings/fish.nix
+++ b/user/settings/fish.nix
@@ -40,6 +40,10 @@
       ds = "du -hd1 $argv[1] | sort -h";
     };
   };
+  xdg.configFile."fish/completions" = {
+    recursive = true;
+    source = ./fish/completions;
+  };
   xdg.configFile."fish/functions" = {
     recursive = true;
     source = ./fish/functions;
diff --git a/user/settings/fish/completions/ecpenv.fish b/user/settings/fish/completions/ecpenv.fish
new file mode 100644
index 00000000..12cf189e
--- /dev/null
+++ b/user/settings/fish/completions/ecpenv.fish
@@ -0,0 +1 @@
+complete -c ecpenv -x -d "Environment variable" -a "(set -x | string replace ' ' \t'Exported variable')"
diff --git a/user/settings/fish/completions/esetenv.fish b/user/settings/fish/completions/esetenv.fish
new file mode 100644
index 00000000..d004726e
--- /dev/null
+++ b/user/settings/fish/completions/esetenv.fish
@@ -0,0 +1 @@
+complete -c esetenv -n "__fish_is_nth_token 1" -x -d "Environment variable" -a "(set -x | string replace ' ' \t'Exported variable')"