diff options
author | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-04-05 11:57:45 -0400 |
---|---|---|
committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-04-05 11:57:45 -0400 |
commit | b88d77fb2d0d5028a6f5670695dee6bec129501f (patch) | |
tree | 2536b0461d297e647cf07157641c9b1223339adf /home-config/fish/conf.d/_tide_init.fish | |
parent | 776a7ca55d2d2c3f396de91db1c6c3c5065012cd (diff) |
ahhh sloppy fish, still needs fixing, esp with the vars
Diffstat (limited to 'home-config/fish/conf.d/_tide_init.fish')
-rw-r--r-- | home-config/fish/conf.d/_tide_init.fish | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/home-config/fish/conf.d/_tide_init.fish b/home-config/fish/conf.d/_tide_init.fish new file mode 100644 index 0000000..b448002 --- /dev/null +++ b/home-config/fish/conf.d/_tide_init.fish | |||
@@ -0,0 +1,44 @@ | |||
1 | function _tide_init_install --on-event _tide_init_install | ||
2 | set -U VIRTUAL_ENV_DISABLE_PROMPT true | ||
3 | |||
4 | source (functions --details _tide_sub_configure) | ||
5 | _load_config lean | ||
6 | _tide_finish | ||
7 | |||
8 | if status is-interactive | ||
9 | tide bug-report --check || sleep 4 | ||
10 | |||
11 | if contains ilancosman/tide (string lower $_fisher_plugins) | ||
12 | set_color bryellow | ||
13 | echo "ilancosman/tide is a development branch. Please install from a release tag:" | ||
14 | _tide_fish_colorize "fisher install ilancosman/tide@v6" | ||
15 | sleep 3 | ||
16 | end | ||
17 | |||
18 | switch (read --prompt-str="Configure tide prompt? [Y/n] " | string lower) | ||
19 | case y ye yes '' | ||
20 | tide configure | ||
21 | case '*' | ||
22 | echo -s \n 'Run ' (_tide_fish_colorize "tide configure") ' to customize your prompt.' | ||
23 | end | ||
24 | end | ||
25 | end | ||
26 | |||
27 | function _tide_init_update --on-event _tide_init_update | ||
28 | # Warn users who install from main branch | ||
29 | if contains ilancosman/tide (string lower $_fisher_plugins) | ||
30 | set_color bryellow | ||
31 | echo "ilancosman/tide is a development branch. Please install from a release tag:" | ||
32 | _tide_fish_colorize "fisher install ilancosman/tide@v6" | ||
33 | sleep 3 | ||
34 | end | ||
35 | |||
36 | # Set (disable) the new jobs variable | ||
37 | set -q tide_jobs_number_threshold || set -U tide_jobs_number_threshold 1000 | ||
38 | end | ||
39 | |||
40 | function _tide_init_uninstall --on-event _tide_init_uninstall | ||
41 | set -e VIRTUAL_ENV_DISABLE_PROMPT | ||
42 | set -e (set -U --names | string match --entire -r '^_?tide') | ||
43 | functions --erase (functions --all | string match --entire -r '^_?tide') | ||
44 | end | ||