@heyitsiveen/dotfiles 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/index.mjs +115 -85
  2. package/dotfiles/macos/.config/fish/completions/fisher.fish +7 -0
  3. package/dotfiles/macos/.config/fish/completions/tide.fish +13 -0
  4. package/dotfiles/macos/.config/fish/conf.d/_tide_init.fish +44 -0
  5. package/dotfiles/macos/.config/fish/fish_plugins +2 -0
  6. package/dotfiles/macos/.config/fish/functions/_tide_1_line_prompt.fish +19 -0
  7. package/dotfiles/macos/.config/fish/functions/_tide_2_line_prompt.fish +31 -0
  8. package/dotfiles/macos/.config/fish/functions/_tide_cache_variables.fish +17 -0
  9. package/dotfiles/macos/.config/fish/functions/_tide_detect_os.fish +76 -0
  10. package/dotfiles/macos/.config/fish/functions/_tide_find_and_remove.fish +3 -0
  11. package/dotfiles/macos/.config/fish/functions/_tide_fish_colorize.fish +7 -0
  12. package/dotfiles/macos/.config/fish/functions/_tide_item_aws.fish +11 -0
  13. package/dotfiles/macos/.config/fish/functions/_tide_item_bun.fish +6 -0
  14. package/dotfiles/macos/.config/fish/functions/_tide_item_character.fish +17 -0
  15. package/dotfiles/macos/.config/fish/functions/_tide_item_cmd_duration.fish +12 -0
  16. package/dotfiles/macos/.config/fish/functions/_tide_item_context.fish +14 -0
  17. package/dotfiles/macos/.config/fish/functions/_tide_item_crystal.fish +6 -0
  18. package/dotfiles/macos/.config/fish/functions/_tide_item_direnv.fish +7 -0
  19. package/dotfiles/macos/.config/fish/functions/_tide_item_distrobox.fish +4 -0
  20. package/dotfiles/macos/.config/fish/functions/_tide_item_docker.fish +5 -0
  21. package/dotfiles/macos/.config/fish/functions/_tide_item_elixir.fish +4 -0
  22. package/dotfiles/macos/.config/fish/functions/_tide_item_gcloud.fish +8 -0
  23. package/dotfiles/macos/.config/fish/functions/_tide_item_git.fish +72 -0
  24. package/dotfiles/macos/.config/fish/functions/_tide_item_go.fish +6 -0
  25. package/dotfiles/macos/.config/fish/functions/_tide_item_java.fish +6 -0
  26. package/dotfiles/macos/.config/fish/functions/_tide_item_jobs.fish +7 -0
  27. package/dotfiles/macos/.config/fish/functions/_tide_item_kubectl.fish +4 -0
  28. package/dotfiles/macos/.config/fish/functions/_tide_item_nix_shell.fish +3 -0
  29. package/dotfiles/macos/.config/fish/functions/_tide_item_node.fish +6 -0
  30. package/dotfiles/macos/.config/fish/functions/_tide_item_os.fish +3 -0
  31. package/dotfiles/macos/.config/fish/functions/_tide_item_php.fish +6 -0
  32. package/dotfiles/macos/.config/fish/functions/_tide_item_private_mode.fish +3 -0
  33. package/dotfiles/macos/.config/fish/functions/_tide_item_pulumi.fish +19 -0
  34. package/dotfiles/macos/.config/fish/functions/_tide_item_python.fish +27 -0
  35. package/dotfiles/macos/.config/fish/functions/_tide_item_ruby.fish +6 -0
  36. package/dotfiles/macos/.config/fish/functions/_tide_item_rustc.fish +6 -0
  37. package/dotfiles/macos/.config/fish/functions/_tide_item_shlvl.fish +4 -0
  38. package/dotfiles/macos/.config/fish/functions/_tide_item_status.fish +15 -0
  39. package/dotfiles/macos/.config/fish/functions/_tide_item_terraform.fish +5 -0
  40. package/dotfiles/macos/.config/fish/functions/_tide_item_time.fish +3 -0
  41. package/dotfiles/macos/.config/fish/functions/_tide_item_toolbox.fish +4 -0
  42. package/dotfiles/macos/.config/fish/functions/_tide_item_vi_mode.fish +16 -0
  43. package/dotfiles/macos/.config/fish/functions/_tide_item_zig.fish +6 -0
  44. package/dotfiles/macos/.config/fish/functions/_tide_parent_dirs.fish +10 -0
  45. package/dotfiles/macos/.config/fish/functions/_tide_print_item.fish +22 -0
  46. package/dotfiles/macos/.config/fish/functions/_tide_pwd.fish +42 -0
  47. package/dotfiles/macos/.config/fish/functions/_tide_remove_unusable_items.fish +25 -0
  48. package/dotfiles/macos/.config/fish/functions/_tide_sub_bug-report.fish +73 -0
  49. package/dotfiles/macos/.config/fish/functions/_tide_sub_configure.fish +156 -0
  50. package/dotfiles/macos/.config/fish/functions/_tide_sub_reload.fish +3 -0
  51. package/dotfiles/macos/.config/fish/functions/fish_mode_prompt.fish +1 -0
  52. package/dotfiles/macos/.config/fish/functions/fish_prompt.fish +170 -0
  53. package/dotfiles/macos/.config/fish/functions/fisher.fish +251 -0
  54. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/finish.fish +46 -0
  55. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/icons.fish +33 -0
  56. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/prompt_colors.fish +26 -0
  57. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/prompt_connection.fish +31 -0
  58. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish +40 -0
  59. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/prompt_spacing.fish +22 -0
  60. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/show_time.fish +33 -0
  61. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/style.fish +36 -0
  62. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/all/transient.fish +22 -0
  63. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/classic/classic_prompt_color.fish +38 -0
  64. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/classic/classic_prompt_separators.fish +40 -0
  65. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/lean/lean_prompt_height.fish +26 -0
  66. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish +32 -0
  67. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/powerline/powerline_prompt_style.fish +51 -0
  68. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish +40 -0
  69. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/powerline/powerline_right_prompt_frame.fish +20 -0
  70. package/dotfiles/macos/.config/fish/functions/tide/configure/choices/rainbow/rainbow_prompt_separators.fish +40 -0
  71. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/classic.fish +118 -0
  72. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/classic_16color.fish +91 -0
  73. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/lean.fish +118 -0
  74. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/lean_16color.fish +91 -0
  75. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/rainbow.fish +118 -0
  76. package/dotfiles/macos/.config/fish/functions/tide/configure/configs/rainbow_16color.fish +95 -0
  77. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_cache_variables.fish +41 -0
  78. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_character.fish +8 -0
  79. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_cmd_duration.fish +3 -0
  80. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_git.fish +3 -0
  81. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_newline.fish +5 -0
  82. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_os.fish +3 -0
  83. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_item_time.fish +3 -0
  84. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_print_item.fish +22 -0
  85. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_prompt.fish +42 -0
  86. package/dotfiles/macos/.config/fish/functions/tide/configure/functions/_fake_tide_pwd.fish +11 -0
  87. package/dotfiles/macos/.config/fish/functions/tide/configure/icons.fish +41 -0
  88. package/dotfiles/macos/.config/fish/functions/tide.fish +28 -0
  89. package/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ function fish_prompt
2
+ end # In case this file gets loaded non-interactively, e.g by conda
3
+ status is-interactive || exit
4
+
5
+ _tide_remove_unusable_items
6
+ _tide_cache_variables
7
+ _tide_parent_dirs
8
+ source (functions --details _tide_pwd)
9
+
10
+ set -l prompt_var _tide_prompt_$fish_pid
11
+ set -U $prompt_var # Set var here so if we erase $prompt_var, bg job won't set a uvar
12
+
13
+ set_color normal | read -l color_normal
14
+ status fish-path | read -l fish_path
15
+
16
+ # _tide_repaint prevents us from creating a second background job
17
+ function _tide_refresh_prompt --on-variable $prompt_var --on-variable COLUMNS
18
+ set -g _tide_repaint
19
+ commandline -f repaint
20
+ end
21
+
22
+ if contains newline $_tide_left_items # two line prompt initialization
23
+ test "$tide_prompt_add_newline_before" = true && set -l add_newline '\n'
24
+
25
+ set_color $tide_prompt_color_frame_and_connection -b normal | read -l prompt_and_frame_color
26
+
27
+ set -l column_offset 5
28
+ test "$tide_left_prompt_frame_enabled" = true &&
29
+ set -l top_left_frame "$prompt_and_frame_color╭─" &&
30
+ set -l bot_left_frame "$prompt_and_frame_color╰─" &&
31
+ set column_offset 3
32
+ test "$tide_right_prompt_frame_enabled" = true &&
33
+ set -l top_right_frame "$prompt_and_frame_color─╮" &&
34
+ set -l bot_right_frame "$prompt_and_frame_color─╯" &&
35
+ set column_offset (math $column_offset-2)
36
+
37
+ if test "$tide_prompt_transient_enabled" = true
38
+ eval "
39
+ function fish_prompt
40
+ _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint
41
+ jobs -q && jobs -p | count | read -lx _tide_jobs
42
+ $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus
43
+ set _tide_parent_dirs \$_tide_parent_dirs
44
+ PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_2_line_prompt)\" &
45
+ builtin disown
46
+
47
+ command kill \$_tide_last_pid 2>/dev/null
48
+ set -g _tide_last_pid \$last_pid
49
+ end
50
+
51
+ if not set -q _tide_transient
52
+ math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][3]\")+$column_offset | read -lx dist_btwn_sides
53
+
54
+ echo -n $add_newline'$top_left_frame'(string replace @PWD@ (_tide_pwd) \"\$$prompt_var[1][1]\")'$prompt_and_frame_color'
55
+ string repeat -Nm(math max 0, \$dist_btwn_sides-\$_tide_pwd_len) '$tide_prompt_icon_connection'
56
+
57
+ echo \"\$$prompt_var[1][3]$top_right_frame\"
58
+ end
59
+ echo -n \e\[0J\"$bot_left_frame\$$prompt_var[1][2]$color_normal \"
60
+ end
61
+
62
+ function fish_right_prompt
63
+ set -e _tide_transient || string unescape \"\$$prompt_var[1][4]$bot_right_frame$color_normal\"
64
+ end"
65
+ else
66
+ eval "
67
+ function fish_prompt
68
+ _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint
69
+ jobs -q && jobs -p | count | read -lx _tide_jobs
70
+ $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus
71
+ set _tide_parent_dirs \$_tide_parent_dirs
72
+ PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_2_line_prompt)\" &
73
+ builtin disown
74
+
75
+ command kill \$_tide_last_pid 2>/dev/null
76
+ set -g _tide_last_pid \$last_pid
77
+ end
78
+
79
+ math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][3]\")+$column_offset | read -lx dist_btwn_sides
80
+
81
+ echo -ns $add_newline'$top_left_frame'(string replace @PWD@ (_tide_pwd) \"\$$prompt_var[1][1]\")'$prompt_and_frame_color'
82
+ string repeat -Nm(math max 0, \$dist_btwn_sides-\$_tide_pwd_len) '$tide_prompt_icon_connection'
83
+ echo -ns \"\$$prompt_var[1][3]$top_right_frame\"\n\"$bot_left_frame\$$prompt_var[1][2]$color_normal \"
84
+ end
85
+
86
+ function fish_right_prompt
87
+ string unescape \"\$$prompt_var[1][4]$bot_right_frame$color_normal\"
88
+ end"
89
+ end
90
+ else # one line prompt initialization
91
+ test "$tide_prompt_add_newline_before" = true && set -l add_newline '\0'
92
+
93
+ math 5 -$tide_prompt_min_cols | read -l column_offset
94
+ test $column_offset -ge 0 && set column_offset "+$column_offset"
95
+
96
+ if test "$tide_prompt_transient_enabled" = true
97
+ eval "
98
+ function fish_prompt
99
+ set -lx _tide_status \$status
100
+ _tide_pipestatus=\$pipestatus if not set -e _tide_repaint
101
+ jobs -q && jobs -p | count | read -lx _tide_jobs
102
+ $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus
103
+ set _tide_parent_dirs \$_tide_parent_dirs
104
+ PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_1_line_prompt)\" &
105
+ builtin disown
106
+
107
+ command kill \$_tide_last_pid 2>/dev/null
108
+ set -g _tide_last_pid \$last_pid
109
+ end
110
+
111
+ if set -q _tide_transient
112
+ echo -n \e\[0J
113
+ add_prefix= _tide_item_character
114
+ echo -n '$color_normal '
115
+ else
116
+ math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][2]\")$column_offset | read -lx dist_btwn_sides
117
+ string replace @PWD@ (_tide_pwd) $add_newline \$$prompt_var[1][1]'$color_normal '
118
+ end
119
+ end
120
+
121
+ function fish_right_prompt
122
+ set -e _tide_transient || string unescape \"\$$prompt_var[1][2]$color_normal\"
123
+ end"
124
+ else
125
+ eval "
126
+ function fish_prompt
127
+ _tide_status=\$status _tide_pipestatus=\$pipestatus if not set -e _tide_repaint
128
+ jobs -q && jobs -p | count | read -lx _tide_jobs
129
+ $fish_path -c \"set _tide_pipestatus \$_tide_pipestatus
130
+ set _tide_parent_dirs \$_tide_parent_dirs
131
+ PATH=\$(string escape \"\$PATH\") CMD_DURATION=\$CMD_DURATION fish_bind_mode=\$fish_bind_mode set $prompt_var (_tide_1_line_prompt)\" &
132
+ builtin disown
133
+
134
+ command kill \$_tide_last_pid 2>/dev/null
135
+ set -g _tide_last_pid \$last_pid
136
+ end
137
+
138
+ math \$COLUMNS-(string length -V \"\$$prompt_var[1][1]\$$prompt_var[1][2]\")$column_offset | read -lx dist_btwn_sides
139
+ string replace @PWD@ (_tide_pwd) $add_newline \$$prompt_var[1][1]'$color_normal '
140
+ end
141
+
142
+ function fish_right_prompt
143
+ string unescape \"\$$prompt_var[1][2]$color_normal\"
144
+ end"
145
+ end
146
+ end
147
+
148
+ # Inheriting instead of evaling because here load time is more important than runtime
149
+ function _tide_on_fish_exit --on-event fish_exit --inherit-variable prompt_var
150
+ set -e $prompt_var
151
+ end
152
+
153
+ if test "$tide_prompt_transient_enabled" = true
154
+ function _tide_enter_transient
155
+ # If the commandline will be executed or is empty, and the pager is not open
156
+ # Pager open usually means selecting, not running
157
+ # Can be untrue, but it's better than the alternative
158
+ if commandline --is-valid || test -z "$(commandline)" && not commandline --paging-mode
159
+ set -g _tide_transient
160
+ set -g _tide_repaint
161
+ commandline -f repaint
162
+ end
163
+ commandline -f execute
164
+ end
165
+
166
+ bind \r _tide_enter_transient
167
+ bind \n _tide_enter_transient
168
+ bind -M insert \r _tide_enter_transient
169
+ bind -M insert \n _tide_enter_transient
170
+ end
@@ -0,0 +1,251 @@
1
+ function fisher --argument-names cmd --description "A plugin manager for Fish"
2
+ set --query fisher_path || set --local fisher_path $__fish_config_dir
3
+ set --local fisher_version 4.4.8
4
+ set --local fish_plugins $__fish_config_dir/fish_plugins
5
+
6
+ switch "$cmd"
7
+ case -v --version
8
+ echo "fisher, version $fisher_version"
9
+ case "" -h --help
10
+ echo "Usage: fisher install <plugins...> Install plugins"
11
+ echo " fisher remove <plugins...> Remove installed plugins"
12
+ echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
13
+ echo " fisher update <plugins...> Update installed plugins"
14
+ echo " fisher update Update all installed plugins"
15
+ echo " fisher list [<regex>] List installed plugins matching regex"
16
+ echo "Options:"
17
+ echo " -v, --version Print version"
18
+ echo " -h, --help Print this help message"
19
+ echo "Variables:"
20
+ echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
21
+ case ls list
22
+ string match --entire --regex -- "$argv[2]" $_fisher_plugins
23
+ case install update remove uninstall
24
+ isatty || read --local --null --array stdin && set --append argv $stdin
25
+
26
+ test "$cmd" = uninstall && set cmd remove
27
+
28
+ set --local install_plugins
29
+ set --local update_plugins
30
+ set --local remove_plugins
31
+ set --local arg_plugins $argv[2..-1]
32
+ set --local old_plugins $_fisher_plugins
33
+ set --local new_plugins
34
+
35
+ test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
36
+
37
+ if ! set --query argv[2]
38
+ if test "$cmd" != update
39
+ echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
40
+ else if ! set --query file_plugins
41
+ echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
42
+ end
43
+ set arg_plugins $file_plugins
44
+ else if test "$cmd" = install && ! set --query old_plugins[1]
45
+ set --append arg_plugins $file_plugins
46
+ end
47
+
48
+ for plugin in $arg_plugins
49
+ set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
50
+ contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
51
+ end
52
+
53
+ if set --query argv[2]
54
+ for plugin in $new_plugins
55
+ if contains -- "$plugin" $old_plugins
56
+ test "$cmd" = remove &&
57
+ set --append remove_plugins $plugin ||
58
+ set --append update_plugins $plugin
59
+ else if test "$cmd" = install
60
+ set --append install_plugins $plugin
61
+ else
62
+ echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
63
+ end
64
+ end
65
+ else
66
+ for plugin in $new_plugins
67
+ contains -- "$plugin" $old_plugins &&
68
+ set --append update_plugins $plugin ||
69
+ set --append install_plugins $plugin
70
+ end
71
+
72
+ for plugin in $old_plugins
73
+ contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
74
+ end
75
+ end
76
+
77
+ set --local pid_list
78
+ set --local source_plugins
79
+ set --local fetch_plugins $update_plugins $install_plugins
80
+ set --local fish_path (status fish-path)
81
+
82
+ echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
83
+
84
+ for plugin in $fetch_plugins
85
+ set --local source (command mktemp -d)
86
+ set --append source_plugins $source
87
+
88
+ command mkdir -p $source/{completions,conf.d,themes,functions}
89
+
90
+ $fish_path --command "
91
+ if test -e $plugin
92
+ command cp -Rf $plugin/* $source
93
+ else
94
+ set resp (command mktemp)
95
+ set temp (command mktemp -d)
96
+ set repo (string split -- \@ $plugin) || set repo[2] HEAD
97
+
98
+ if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
99
+ set name (string split -- / \$path)[-1]
100
+ set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
101
+ else
102
+ set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
103
+ end
104
+
105
+ echo Fetching (set_color --underline)\$url(set_color normal)
106
+
107
+ set http (command curl -q --silent -L -o \$resp -w %{http_code} \$url)
108
+
109
+ if test \"\$http\" = 200 && command tar -xzC \$temp -f \$resp 2>/dev/null
110
+ command cp -Rf \$temp/*/* $source
111
+ else if test \"\$http\" = 403
112
+ echo fisher: GitHub API rate limit exceeded \(HTTP 403\) >&2
113
+ command rm -rf $source
114
+ else
115
+ echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
116
+ command rm -rf $source
117
+ end
118
+
119
+ command rm -rf \$temp
120
+ end
121
+
122
+ set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
123
+ " &
124
+
125
+ set --append pid_list (jobs --last --pid)
126
+ end
127
+
128
+ wait $pid_list 2>/dev/null
129
+
130
+ for plugin in $fetch_plugins
131
+ if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
132
+ if set --local index (contains --index -- "$plugin" $install_plugins)
133
+ set --erase install_plugins[$index]
134
+ else
135
+ set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
136
+ end
137
+ end
138
+ end
139
+
140
+ for plugin in $update_plugins $remove_plugins
141
+ if set --local index (contains --index -- "$plugin" $_fisher_plugins)
142
+ set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
143
+
144
+ if contains -- "$plugin" $remove_plugins
145
+ for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
146
+ emit {$name}_uninstall
147
+ end
148
+ printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
149
+ set --erase _fisher_plugins[$index]
150
+ end
151
+
152
+ command rm -rf (string replace -- \~ ~ $$plugin_files_var)
153
+
154
+ functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
155
+
156
+ for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
157
+ complete --erase --command $name
158
+ end
159
+
160
+ set --erase $plugin_files_var
161
+ end
162
+ end
163
+
164
+ if set --query update_plugins[1] || set --query install_plugins[1]
165
+ command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
166
+ end
167
+
168
+ for plugin in $update_plugins $install_plugins
169
+ set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
170
+ set --local files $source/{functions,themes,conf.d,completions}/*
171
+
172
+ if set --local index (contains --index -- $plugin $install_plugins)
173
+ set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
174
+ set --local conflict_files
175
+
176
+ for file in (string replace -- $source/ $fisher_path/ $files)
177
+ contains -- $file $user_files && set --append conflict_files $file
178
+ end
179
+
180
+ if set --query conflict_files[1] && set --erase install_plugins[$index]
181
+ echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
182
+ continue
183
+ end
184
+ end
185
+
186
+ for file in (string replace -- $source/ "" $files)
187
+ command cp -RLf $source/$file $fisher_path/$file
188
+ end
189
+
190
+ set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
191
+
192
+ set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
193
+
194
+ contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
195
+ contains -- $plugin $install_plugins && set --local event install || set --local event update
196
+
197
+ printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
198
+
199
+ for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
200
+ source $file
201
+ if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
202
+ emit {$name}_$event
203
+ end
204
+ end
205
+ end
206
+
207
+ command rm -rf $source_plugins
208
+
209
+ if set --query _fisher_plugins[1]
210
+ set --local commit_plugins
211
+
212
+ for plugin in $file_plugins
213
+ contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
214
+ end
215
+
216
+ for plugin in $_fisher_plugins
217
+ contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
218
+ end
219
+
220
+ string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
221
+ else
222
+ set --erase _fisher_plugins
223
+ command rm -f $fish_plugins
224
+ end
225
+
226
+ set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
227
+
228
+ test "$total" != "0 0 0" && echo (string join ", " (
229
+ test $total[1] = 0 || echo "Installed $total[1]") (
230
+ test $total[2] = 0 || echo "Updated $total[2]") (
231
+ test $total[3] = 0 || echo "Removed $total[3]")
232
+ ) plugin/s
233
+ case \*
234
+ echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
235
+ end
236
+ end
237
+
238
+ if ! set --query _fisher_upgraded_to_4_4
239
+ set --universal _fisher_upgraded_to_4_4
240
+ if functions --query _fisher_list
241
+ set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
242
+ command rm -rf $XDG_DATA_HOME/fisher
243
+ functions --erase _fisher_{list,plugin_parse}
244
+ fisher update >/dev/null 2>/dev/null
245
+ else
246
+ for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
247
+ set $var (string replace -- ~ \~ $$var)
248
+ end
249
+ functions --erase _fisher_fish_postexec
250
+ end
251
+ end
@@ -0,0 +1,46 @@
1
+ function finish
2
+ _tide_title Finish
3
+
4
+ echo
5
+ set_color red
6
+ _tide_option y 'Overwrite your current tide config'
7
+ set_color normal
8
+ echo
9
+
10
+ _tide_option p 'Exit and print the config you just generated'
11
+ echo
12
+
13
+ _tide_menu (status function)
14
+ switch $_tide_selected_option
15
+ case 'Overwrite your current tide config'
16
+ _tide_finish
17
+ command -q clear && clear
18
+ set -q _flag_auto || _tide_print_configure_current_options
19
+ case 'Exit and print the config you just generated'
20
+ _tide_exit_configure
21
+ command -q clear && clear
22
+ _tide_print_configure_current_options
23
+ end
24
+ end
25
+
26
+ function _tide_finish
27
+ _tide_exit_configure
28
+
29
+ # Deal with prompt char/vi mode
30
+ contains character $fake_tide_left_prompt_items || set -p fake_tide_left_prompt_items vi_mode
31
+
32
+ # Set the real variables
33
+ for fakeVar in (set --names | string match -r "^fake_tide.*")
34
+ set -U (string replace 'fake_' '' $fakeVar) $$fakeVar
35
+ end
36
+
37
+ # Make sure old prompt won't display
38
+ set -e $_tide_prompt_var 2>/dev/null
39
+
40
+ # Re-initialize the prompt
41
+ tide reload
42
+ end
43
+
44
+ function _tide_print_configure_current_options
45
+ _tide_fish_colorize "tide configure --auto $_tide_configure_current_options"
46
+ end
@@ -0,0 +1,33 @@
1
+ function icons
2
+ _tide_title Icons
3
+
4
+ _tide_option 1 'Few icons'
5
+ _tide_display_prompt
6
+
7
+ _tide_option 2 'Many icons'
8
+ _enable_icons
9
+ _tide_display_prompt
10
+
11
+ _tide_menu (status function)
12
+ switch $_tide_selected_option
13
+ case 'Few icons'
14
+ _disable_icons
15
+ end
16
+ _next_choice all/transient
17
+ end
18
+
19
+ function _enable_icons
20
+ set -p fake_tide_left_prompt_items os
21
+ set -g fake_tide_pwd_icon 
22
+ set -g fake_tide_pwd_icon_home 
23
+ set -g fake_tide_cmd_duration_icon 
24
+ set -g fake_tide_git_icon 
25
+ end
26
+
27
+ function _disable_icons
28
+ _tide_find_and_remove os fake_tide_left_prompt_items
29
+ set fake_tide_pwd_icon
30
+ set fake_tide_pwd_icon_home
31
+ set fake_tide_cmd_duration_icon
32
+ set fake_tide_git_icon
33
+ end
@@ -0,0 +1,26 @@
1
+ function prompt_colors
2
+ _tide_title 'Prompt Colors'
3
+
4
+ _tide_option 1 'True color'
5
+ _tide_display_prompt
6
+
7
+ _tide_option 2 '16 colors'
8
+ _load_config "$_tide_configure_style"_16color
9
+ set -g _tide_16color true
10
+ _tide_display_prompt
11
+
12
+ _tide_menu (status function)
13
+ switch $_tide_selected_option
14
+ case 'True color'
15
+ _load_config "$_tide_configure_style"
16
+ set -e _tide_16color
17
+ switch $_tide_configure_style
18
+ case lean rainbow
19
+ _next_choice all/show_time
20
+ case classic
21
+ _next_choice classic/classic_prompt_color
22
+ end
23
+ case '16 colors'
24
+ _next_choice all/show_time
25
+ end
26
+ end
@@ -0,0 +1,31 @@
1
+ function prompt_connection
2
+ _tide_title 'Prompt Connection'
3
+
4
+ _tide_option 1 Disconnected
5
+ set -g fake_tide_prompt_icon_connection ' '
6
+ _tide_display_prompt
7
+
8
+ _tide_option 2 Dotted
9
+ set -g fake_tide_prompt_icon_connection '·'
10
+ _tide_display_prompt
11
+
12
+ _tide_option 3 Solid
13
+ set -g fake_tide_prompt_icon_connection '─'
14
+ _tide_display_prompt
15
+
16
+ _tide_menu (status function)
17
+ switch $_tide_selected_option
18
+ case Disconnected
19
+ set -g fake_tide_prompt_icon_connection ' '
20
+ case Dotted
21
+ set -g fake_tide_prompt_icon_connection '·'
22
+ case Solid
23
+ set -g fake_tide_prompt_icon_connection '─'
24
+ end
25
+ switch $_tide_configure_style
26
+ case lean
27
+ _next_choice all/prompt_connection_andor_frame_color
28
+ case classic rainbow
29
+ _next_choice powerline/powerline_right_prompt_frame
30
+ end
31
+ end
@@ -0,0 +1,40 @@
1
+ function prompt_connection_andor_frame_color
2
+ if test "$_tide_16color" = true ||
3
+ test "$fake_tide_left_prompt_frame_enabled" = false -a \
4
+ "$fake_tide_right_prompt_frame_enabled" = false -a \
5
+ "$fake_tide_prompt_icon_connection" = ' '
6
+ _next_choice all/prompt_spacing
7
+ return 0
8
+ end
9
+
10
+ _tide_title "Connection & Frame Color"
11
+
12
+ _tide_option 1 Lightest
13
+ set -g fake_tide_prompt_color_frame_and_connection 808080
14
+ _tide_display_prompt
15
+
16
+ _tide_option 2 Light
17
+ set -g fake_tide_prompt_color_frame_and_connection 6C6C6C
18
+ _tide_display_prompt
19
+
20
+ _tide_option 3 Dark
21
+ set -g fake_tide_prompt_color_frame_and_connection 585858
22
+ _tide_display_prompt
23
+
24
+ _tide_option 4 Darkest
25
+ set -g fake_tide_prompt_color_frame_and_connection 444444
26
+ _tide_display_prompt
27
+
28
+ _tide_menu (status function)
29
+ switch $_tide_selected_option
30
+ case Lightest
31
+ set -g fake_tide_prompt_color_frame_and_connection 808080
32
+ case Light
33
+ set -g fake_tide_prompt_color_frame_and_connection 6C6C6C
34
+ case Dark
35
+ set -g fake_tide_prompt_color_frame_and_connection 585858
36
+ case Darkest
37
+ set -g fake_tide_prompt_color_frame_and_connection 444444
38
+ end
39
+ _next_choice all/prompt_spacing
40
+ end
@@ -0,0 +1,22 @@
1
+ function prompt_spacing
2
+ _tide_title 'Prompt Spacing'
3
+
4
+ _tide_option 1 Compact
5
+ set -g fake_tide_prompt_add_newline_before false
6
+ _tide_display_prompt
7
+ _tide_display_prompt
8
+
9
+ _tide_option 2 Sparse
10
+ set -g fake_tide_prompt_add_newline_before true
11
+ _tide_display_prompt
12
+ _tide_display_prompt
13
+
14
+ _tide_menu (status function)
15
+ switch $_tide_selected_option
16
+ case Compact
17
+ set -g fake_tide_prompt_add_newline_before false
18
+ case Sparse
19
+ set -g fake_tide_prompt_add_newline_before true
20
+ end
21
+ _next_choice all/icons
22
+ end
@@ -0,0 +1,33 @@
1
+ function show_time
2
+ _tide_title 'Show current time?'
3
+
4
+ _tide_option 1 No
5
+ _tide_display_prompt
6
+
7
+ set -a fake_tide_right_prompt_items time
8
+
9
+ _tide_option 2 '24-hour format'
10
+ set -g fake_tide_time_format %T
11
+ _tide_display_prompt
12
+
13
+ _tide_option 3 '12-hour format'
14
+ set -g fake_tide_time_format %r
15
+ _tide_display_prompt
16
+
17
+ _tide_menu (status function)
18
+ switch $_tide_selected_option
19
+ case No
20
+ set -g fake_tide_time_format ''
21
+ set -e fake_tide_right_prompt_items[-1]
22
+ case '24-hour format'
23
+ set -g fake_tide_time_format %T
24
+ case '12-hour format'
25
+ set -g fake_tide_time_format %r
26
+ end
27
+ switch $_tide_configure_style
28
+ case lean
29
+ _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height
30
+ case classic rainbow
31
+ _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators
32
+ end
33
+ end