diff --git a/dot_config/private_fish/completions/.keep b/dot_config/private_fish/completions/.keep
deleted file mode 100644
index e69de29..0000000
diff --git a/dot_config/private_fish/completions/fisher.fish b/dot_config/private_fish/completions/fisher.fish
deleted file mode 100644
index 6d23ce4..0000000
--- a/dot_config/private_fish/completions/fisher.fish
+++ /dev/null
@@ -1,7 +0,0 @@
-complete --command fisher --exclusive --long help --description "Print help"
-complete --command fisher --exclusive --long version --description "Print version"
-complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
-complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
-complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
-complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
-complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"
diff --git a/dot_config/private_fish/conf.d/.keep b/dot_config/private_fish/conf.d/.keep
deleted file mode 100644
index e69de29..0000000
diff --git a/dot_config/private_fish/conf.d/autopair.fish b/dot_config/private_fish/conf.d/autopair.fish
deleted file mode 100644
index abb4bf3..0000000
--- a/dot_config/private_fish/conf.d/autopair.fish
+++ /dev/null
@@ -1,39 +0,0 @@
-status is-interactive || exit
-
-set --global autopair_left "(" "[" "{" '"' "'"
-set --global autopair_right ")" "]" "}" '"' "'"
-set --global autopair_pairs "()" "[]" "{}" '""' "''"
-
-function _autopair_fish_key_bindings --on-variable fish_key_bindings
- set --query fish_key_bindings[1] || return
-
- test $fish_key_bindings = fish_default_key_bindings &&
- set --local mode default insert ||
- set --local mode insert default
-
- bind --mode $mode[-1] --erase \177 \b \t
-
- bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫
- bind --mode $mode[1] \b _autopair_backspace
- bind --mode $mode[1] \t _autopair_tab
-
- printf "%s\n" $autopair_pairs | while read --local left right --delimiter ""
- bind --mode $mode[-1] --erase $left $right
- if test $left = $right
- bind --mode $mode[1] $left "_autopair_insert_same \\$left"
- else
- bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right"
- bind --mode $mode[1] $right "_autopair_insert_right \\$right"
- end
- end
-end
-
-_autopair_fish_key_bindings
-
-function _autopair_uninstall --on-event autopair_uninstall
- string collect (
- bind --all | string replace --filter --regex -- "_autopair.*" --erase
- set --names | string replace --filter --regex -- "^autopair" "set --erase autopair"
- ) | source
- functions --erase (functions --all | string match "_autopair_*")
-end
diff --git a/dot_config/private_fish/conf.d/done.fish b/dot_config/private_fish/conf.d/done.fish
deleted file mode 100644
index b1a989b..0000000
--- a/dot_config/private_fish/conf.d/done.fish
+++ /dev/null
@@ -1,300 +0,0 @@
-# MIT License
-
-# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-if not status is-interactive
- exit
-end
-
-set -g __done_version 1.16.5
-
-function __done_run_powershell_script
- set -l powershell_exe (command --search "powershell.exe")
-
- if test $status -ne 0
- and command --search wslvar
-
- set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe)
- end
-
- if string length --quiet "$powershell_exe"
- and test -x "$powershell_exe"
-
- set cmd (string escape $argv)
-
- eval "$powershell_exe -Command $cmd"
- end
-end
-
-function __done_windows_notification -a title -a message
- if test "$__done_notify_sound" -eq 1
- set soundopt ""
- else
- set soundopt ""
- end
-
- __done_run_powershell_script "
-[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
-[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
-
-\$toast_xml_source = @\"
-
- $soundopt
-
-
- $title
- $message
-
-
-
-\"@
-
-\$toast_xml = New-Object Windows.Data.Xml.Dom.XmlDocument
-\$toast_xml.loadXml(\$toast_xml_source)
-
-\$toast = New-Object Windows.UI.Notifications.ToastNotification \$toast_xml
-
-[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier(\"fish\").Show(\$toast)
-"
-end
-
-function __done_get_focused_window_id
- if type -q lsappinfo
- lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
- else if test -n "$SWAYSOCK"
- and type -q jq
- swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id'
- else if begin
- test "$XDG_SESSION_DESKTOP" = gnome; and type -q gdbus
- end
- gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'global.display.focus_window.get_id()'
- else if type -q xprop
- and test -n "$DISPLAY"
- # Test that the X server at $DISPLAY is running
- and xprop -grammar >/dev/null 2>&1
- xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2
- else if uname -a | string match --quiet --ignore-case --regex microsoft
- __done_run_powershell_script '
-Add-Type @"
- using System;
- using System.Runtime.InteropServices;
- public class WindowsCompat {
- [DllImport("user32.dll")]
- public static extern IntPtr GetForegroundWindow();
- }
-"@
-[WindowsCompat]::GetForegroundWindow()
-'
- else if set -q __done_allow_nongraphical
- echo 12345 # dummy value
- end
-end
-
-function __done_is_tmux_window_active
- set -q fish_pid; or set -l fish_pid %self
-
- # find the outermost process within tmux
- # ppid != "tmux" -> pid = ppid
- # ppid == "tmux" -> break
- set tmux_fish_pid $fish_pid
- while set tmux_fish_ppid (ps -o ppid= -p $tmux_fish_pid | string trim)
- and ! string match -q "tmux*" (basename (ps -o command= -p $tmux_fish_ppid))
- set tmux_fish_pid $tmux_fish_ppid
- end
-
- # tmux session attached and window is active -> no notification
- # all other combinations -> send notification
- tmux list-panes -a -F "#{session_attached} #{window_active} #{pane_pid}" | string match -q "1 1 $tmux_fish_pid"
-end
-
-function __done_is_screen_window_active
- string match --quiet --regex "$STY\s+\(Attached" (screen -ls)
-end
-
-function __done_is_process_window_focused
- # Return false if the window is not focused
-
- if set -q __done_allow_nongraphical
- return 1
- end
-
- set __done_focused_window_id (__done_get_focused_window_id)
- if test "$__done_sway_ignore_visible" -eq 1
- and test -n "$SWAYSOCK"
- string match --quiet --regex "^true" (swaymsg -t get_tree | jq ".. | objects | select(.id == "$__done_initial_window_id") | .visible")
- return $status
- else if test "$__done_initial_window_id" != "$__done_focused_window_id"
- return 1
- end
- # If inside a tmux session, check if the tmux window is focused
- if type -q tmux
- and test -n "$TMUX"
- __done_is_tmux_window_active
- return $status
- end
-
- # If inside a screen session, check if the screen window is focused
- if type -q screen
- and test -n "$STY"
- __done_is_screen_window_active
- return $status
- end
-
- return 0
-end
-
-function __done_humanize_duration -a milliseconds
- set -l seconds (math --scale=0 "$milliseconds/1000" % 60)
- set -l minutes (math --scale=0 "$milliseconds/60000" % 60)
- set -l hours (math --scale=0 "$milliseconds/3600000")
-
- if test $hours -gt 0
- printf '%s' $hours'h '
- end
- if test $minutes -gt 0
- printf '%s' $minutes'm '
- end
- if test $seconds -gt 0
- printf '%s' $seconds's'
- end
-end
-
-# verify that the system has graphical capabilities before initializing
-if test -z "$SSH_CLIENT" # not over ssh
- and count (__done_get_focused_window_id) >/dev/null # is able to get window id
- set __done_enabled
-end
-
-if set -q __done_allow_nongraphical
- and set -q __done_notification_command
- set __done_enabled
-end
-
-if set -q __done_enabled
- set -g __done_initial_window_id ''
- set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000
- set -q __done_exclude; or set -g __done_exclude 'git (?!push|pull|fetch)'
- set -q __done_notify_sound; or set -g __done_notify_sound 0
- set -q __done_sway_ignore_visible; or set -g __done_sway_ignore_visible 0
-
- function __done_started --on-event fish_preexec
- set __done_initial_window_id (__done_get_focused_window_id)
- end
-
- function __done_ended --on-event fish_prompt
- set -l exit_status $status
-
- # backwards compatibility for fish < v3.0
- set -q cmd_duration; or set -l cmd_duration $CMD_DURATION
-
- if test $cmd_duration
- and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration
- and not __done_is_process_window_focused # process pane or window not focused
- and not string match -qr $__done_exclude $history[1] # don't notify on git commands which might wait external editor
-
- # Store duration of last command
- set -l humanized_duration (__done_humanize_duration "$cmd_duration")
-
- set -l title "Done in $humanized_duration"
- set -l wd (string replace --regex "^$HOME" "~" (pwd))
- set -l message "$wd/ $history[1]"
- set -l sender $__done_initial_window_id
-
- if test $exit_status -ne 0
- set title "Failed ($exit_status) after $humanized_duration"
- end
-
- if set -q __done_notification_command
- eval $__done_notification_command
- if test "$__done_notify_sound" -eq 1
- echo -e "\a" # bell sound
- end
- else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier
- if test "$__done_notify_sound" -eq 1
- terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id" -sound default
- else
- terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id"
- end
-
- else if type -q osascript # AppleScript
- osascript -e "display notification \"$message\" with title \"$title\""
- if test "$__done_notify_sound" -eq 1
- echo -e "\a" # bell sound
- end
-
- else if type -q notify-send # Linux notify-send
- # set urgency to normal
- set -l urgency normal
-
- # use user-defined urgency if set
- if set -q __done_notification_urgency_level
- set urgency "$__done_notification_urgency_level"
- end
- # override user-defined urgency level if non-zero exitstatus
- if test $exit_status -ne 0
- set urgency critical
- if set -q __done_notification_urgency_level_failure
- set urgency "$__done_notification_urgency_level_failure"
- end
- end
-
- notify-send --hint=int:transient:1 --urgency=$urgency --icon=utilities-terminal --app-name=fish "$title" "$message"
-
- if test "$__done_notify_sound" -eq 1
- echo -e "\a" # bell sound
- end
-
- else if type -q notify-desktop # Linux notify-desktop
- set -l urgency
- if test $exit_status -ne 0
- set urgency "--urgency=critical"
- end
- notify-desktop $urgency --icon=utilities-terminal --app-name=fish "$title" "$message"
- if test "$__done_notify_sound" -eq 1
- echo -e "\a" # bell sound
- end
-
- else if uname -a | string match --quiet --ignore-case --regex microsoft
- __done_windows_notification "$title" "$message"
-
- else # anything else
- echo -e "\a" # bell sound
- end
-
- end
- end
-end
-
-function __done_uninstall -e done_uninstall
- # Erase all __done_* functions
- functions -e __done_ended
- functions -e __done_started
- functions -e __done_get_focused_window_id
- functions -e __done_is_tmux_window_active
- functions -e __done_is_screen_window_active
- functions -e __done_is_process_window_focused
- functions -e __done_windows_notification
- functions -e __done_run_powershell_script
- functions -e __done_humanize_duration
-
- # Erase __done variables
- set -e __done_version
-end
diff --git a/dot_config/private_fish/conf.d/fzf.fish b/dot_config/private_fish/conf.d/fzf.fish
deleted file mode 100644
index 8156c11..0000000
--- a/dot_config/private_fish/conf.d/fzf.fish
+++ /dev/null
@@ -1,28 +0,0 @@
-# fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup
-if not status is-interactive && test "$CI" != true
- exit
-end
-
-# Because of scoping rules, to capture the shell variables exactly as they are, we must read
-# them before even executing _fzf_search_variables. We use psub to store the
-# variables' info in temporary files and pass in the filenames as arguments.
-# This variable is global so that it can be referenced by fzf_configure_bindings and in tests
-set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)'
-
-
-# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
-fzf_configure_bindings
-
-# Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased
-function _fzf_uninstall --on-event fzf_uninstall
- _fzf_uninstall_bindings
-
- set --erase _fzf_search_vars_command
- functions --erase _fzf_uninstall _fzf_migration_message _fzf_uninstall_bindings fzf_configure_bindings
- complete --erase fzf_configure_bindings
-
- set_color cyan
- echo "fzf.fish uninstalled."
- echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings."
- set_color normal
-end
diff --git a/dot_config/private_fish/conf.d/nvm.fish b/dot_config/private_fish/conf.d/nvm.fish
deleted file mode 100644
index 8aab50a..0000000
--- a/dot_config/private_fish/conf.d/nvm.fish
+++ /dev/null
@@ -1,28 +0,0 @@
-function _nvm_install --on-event nvm_install
- set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist
- set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
- set --universal nvm_data $XDG_DATA_HOME/nvm
-
- test ! -d $nvm_data && command mkdir -p $nvm_data
- echo "Downloading the Node distribution index..." 2>/dev/null
- _nvm_index_update
-end
-
-function _nvm_update --on-event nvm_update
- set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist
- set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
- set --universal nvm_data $XDG_DATA_HOME/nvm
-end
-
-function _nvm_uninstall --on-event nvm_uninstall
- command rm -rf $nvm_data
-
- set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
-
- set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source
- functions --erase (functions --all | string match --entire --regex -- "^_nvm_")
-end
-
-if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version
- nvm use --silent $nvm_default_version
-end
diff --git a/dot_config/private_fish/conf.d/z.fish b/dot_config/private_fish/conf.d/z.fish
deleted file mode 100644
index 59c960f..0000000
--- a/dot_config/private_fish/conf.d/z.fish
+++ /dev/null
@@ -1,63 +0,0 @@
-if test -z "$Z_DATA"
- if test -z "$XDG_DATA_HOME"
- set -U Z_DATA_DIR "$HOME/.local/share/z"
- else
- set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
- end
- set -U Z_DATA "$Z_DATA_DIR/data"
-end
-
-if test ! -e "$Z_DATA"
- if test ! -e "$Z_DATA_DIR"
- mkdir -p -m 700 "$Z_DATA_DIR"
- end
- touch "$Z_DATA"
-end
-
-if test -z "$Z_CMD"
- set -U Z_CMD z
-end
-
-set -U ZO_CMD "$Z_CMD"o
-
-if test ! -z $Z_CMD
- function $Z_CMD -d "jump around"
- __z $argv
- end
-end
-
-if test ! -z $ZO_CMD
- function $ZO_CMD -d "open target dir"
- __z -d $argv
- end
-end
-
-if not set -q Z_EXCLUDE
- set -U Z_EXCLUDE "^$HOME\$"
-else if contains $HOME $Z_EXCLUDE
- # Workaround: migrate old default values to a regex (see #90).
- set Z_EXCLUDE (string replace -r -- "^$HOME\$" '^'$HOME'$$' $Z_EXCLUDE)
-end
-
-# Setup completions once first
-__z_complete
-
-function __z_on_variable_pwd --on-variable PWD
- __z_add
-end
-
-function __z_uninstall --on-event z_uninstall
- functions -e __z_on_variable_pwd
- functions -e $Z_CMD
- functions -e $ZO_CMD
-
- if test ! -z "$Z_DATA"
- printf "To completely erase z's data, remove:\n" >/dev/stderr
- printf "%s\n" "$Z_DATA" >/dev/stderr
- end
-
- set -e Z_CMD
- set -e ZO_CMD
- set -e Z_DATA
- set -e Z_EXCLUDE
-end
diff --git a/dot_config/private_fish/functions/.keep b/dot_config/private_fish/functions/.keep
deleted file mode 100644
index e69de29..0000000
diff --git a/dot_config/private_fish/functions/__z.fish b/dot_config/private_fish/functions/__z.fish
deleted file mode 100644
index f72ff0e..0000000
--- a/dot_config/private_fish/functions/__z.fish
+++ /dev/null
@@ -1,174 +0,0 @@
-function __z -d "Jump to a recent directory."
- function __print_help -d "Print z help."
- printf "Usage: $Z_CMD [-celrth] string1 string2...\n\n"
- printf " -c --clean Removes directories that no longer exist from $Z_DATA\n"
- printf " -d --dir Opens matching directory using system file manager.\n"
- printf " -e --echo Prints best match, no cd\n"
- printf " -l --list List matches and scores, no cd\n"
- printf " -p --purge Delete all entries from $Z_DATA\n"
- printf " -r --rank Search by rank\n"
- printf " -t --recent Search by recency\n"
- printf " -x --delete Removes the current directory from $Z_DATA\n"
- printf " -h --help Print this help\n\n"
- end
- function __z_legacy_escape_regex
- # taken from escape_string_pcre2 in fish
- # used to provide compatibility with fish 2
- for c in (string split '' $argv)
- if contains $c (string split '' '.^$*+()?[{}\\|-]')
- printf \\
- end
- printf '%s' $c
- end
- end
-
- set -l options h/help c/clean e/echo l/list p/purge r/rank t/recent d/directory x/delete
-
- argparse $options -- $argv
-
- if set -q _flag_help
- __print_help
- return 0
- else if set -q _flag_clean
- __z_clean
- printf "%s cleaned!\n" $Z_DATA
- return 0
- else if set -q _flag_purge
- echo >$Z_DATA
- printf "%s purged!\n" $Z_DATA
- return 0
- else if set -q _flag_delete
- sed -i -e "\:^$PWD|.*:d" $Z_DATA
- return 0
- end
-
- set -l typ
-
- if set -q _flag_rank
- set typ rank
- else if set -q _flag_recent
- set typ recent
- end
-
- set -l z_script '
- function frecent(rank, time) {
- dx = t-time
- if( dx < 3600 ) return rank*4
- if( dx < 86400 ) return rank*2
- if( dx < 604800 ) return rank/2
- return rank/4
- }
-
- function output(matches, best_match, common) {
- # list or return the desired directory
- if( list ) {
- cmd = "sort -nr"
- for( x in matches ) {
- if( matches[x] ) {
- printf "%-10s %s\n", matches[x], x | cmd
- }
- }
- } else {
- if( common ) best_match = common
- print best_match
- }
- }
-
- function common(matches) {
- # find the common root of a list of matches, if it exists
- for( x in matches ) {
- if( matches[x] && (!short || length(x) < length(short)) ) {
- short = x
- }
- }
- if( short == "/" ) return
- for( x in matches ) if( matches[x] && index(x, short) != 1 ) {
- return
- }
- return short
- }
-
- BEGIN {
- hi_rank = ihi_rank = -9999999999
- }
- {
- if( typ == "rank" ) {
- rank = $2
- } else if( typ == "recent" ) {
- rank = $3 - t
- } else rank = frecent($2, $3)
- if( $1 ~ q ) {
- matches[$1] = rank
- } else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank
- if( matches[$1] && matches[$1] > hi_rank ) {
- best_match = $1
- hi_rank = matches[$1]
- } else if( imatches[$1] && imatches[$1] > ihi_rank ) {
- ibest_match = $1
- ihi_rank = imatches[$1]
- }
- }
-
- END {
- # prefer case sensitive
- if( best_match ) {
- output(matches, best_match, common(matches))
- } else if( ibest_match ) {
- output(imatches, ibest_match, common(imatches))
- }
- }
- '
-
- set -l qs
- for arg in $argv
- set -l escaped $arg
- if string escape --style=regex '' >/dev/null 2>&1 # use builtin escape if available
- set escaped (string escape --style=regex $escaped)
- else
- set escaped (__z_legacy_escape_regex $escaped)
- end
- # Need to escape twice, see https://www.math.utah.edu/docs/info/gawk_5.html#SEC32
- set escaped (string replace --all \\ \\\\ $escaped)
- set qs $qs $escaped
- end
- set -l q (string join '.*' $qs)
-
- if set -q _flag_list
- # Handle list separately as it can print common path information to stderr
- # which cannot be captured from a subcommand.
- command awk -v t=(date +%s) -v list="list" -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA"
- return
- end
-
- set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA")
-
- if test "$status" -gt 0
- return
- end
-
- if test -z "$target"
- printf "'%s' did not match any results\n" "$argv"
- return 1
- end
-
- if set -q _flag_echo
- printf "%s\n" "$target"
- else if set -q _flag_directory
- if test -n "$ZO_METHOD"
- type -q "$ZO_METHOD"; and "$ZO_METHOD" "$target"; and return $status
- echo "Cannot open with ZO_METHOD set to $ZO_METHOD"; and return 1
- else if test "$OS" = Windows_NT
- # Be careful, in msys2, explorer always return 1
- type -q explorer; and explorer "$target"
- return 0
- echo "Cannot open file explorer"
- return 1
- else
- type -q xdg-open; and xdg-open "$target"; and return $status
- type -q open; and open "$target"; and return $status
- echo "Not sure how to open file manager"; and return 1
- end
- else
- pushd "$target"
- end
-end
diff --git a/dot_config/private_fish/functions/__z_add.fish b/dot_config/private_fish/functions/__z_add.fish
deleted file mode 100644
index 20d5d7e..0000000
--- a/dot_config/private_fish/functions/__z_add.fish
+++ /dev/null
@@ -1,49 +0,0 @@
-function __z_add -d "Add PATH to .z file"
- test -n "$fish_private_mode"; and return 0
-
- for i in $Z_EXCLUDE
- if string match -r $i $PWD >/dev/null
- return 0 #Path excluded
- end
- end
-
- set -l tmpfile (mktemp $Z_DATA.XXXXXX)
-
- if test -f $tmpfile
- set -l path (string replace --all \\ \\\\ $PWD)
- command awk -v path=$path -v now=(date +%s) -F "|" '
- BEGIN {
- rank[path] = 1
- time[path] = now
- }
- $2 >= 1 {
- if( $1 == path ) {
- rank[$1] = $2 + 1
- time[$1] = now
- }
- else {
- rank[$1] = $2
- time[$1] = $3
- }
- count += $2
- }
- END {
- if( count > 1000 ) {
- for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging
- }
- else for( i in rank ) print i "|" rank[i] "|" time[i]
- }
- ' $Z_DATA 2>/dev/null >$tmpfile
-
- if test ! -z "$Z_OWNER"
- chown $Z_OWNER:(id -ng $Z_OWNER) $tmpfile
- end
- #
- # Don't use redirection here as it can lead to a race condition where $Z_DATA is clobbered.
- # Note: There is a still a possible race condition where an old version of $Z_DATA is
- # read by one instance of Fish before another instance of Fish writes its copy.
- #
- command mv $tmpfile $Z_DATA
- or command rm $tmpfile
- end
-end
diff --git a/dot_config/private_fish/functions/__z_clean.fish b/dot_config/private_fish/functions/__z_clean.fish
deleted file mode 100644
index ae1721a..0000000
--- a/dot_config/private_fish/functions/__z_clean.fish
+++ /dev/null
@@ -1,11 +0,0 @@
-function __z_clean -d "Clean up .z file to remove paths no longer valid"
- set -l tmpfile (mktemp $Z_DATA.XXXXXX)
-
- if test -f $tmpfile
- while read line
- set -l path (string split '|' $line)[1]
- test -d $path; and echo $line
- end <$Z_DATA >$tmpfile
- command mv -f $tmpfile $Z_DATA
- end
-end
diff --git a/dot_config/private_fish/functions/__z_complete.fish b/dot_config/private_fish/functions/__z_complete.fish
deleted file mode 100644
index a626456..0000000
--- a/dot_config/private_fish/functions/__z_complete.fish
+++ /dev/null
@@ -1,13 +0,0 @@
-function __z_complete -d "add completions"
- complete -c $Z_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k
- complete -c $ZO_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k
-
- complete -c $Z_CMD -s c -l clean -d "Cleans out $Z_DATA"
- complete -c $Z_CMD -s e -l echo -d "Prints best match, no cd"
- complete -c $Z_CMD -s l -l list -d "List matches, no cd"
- complete -c $Z_CMD -s p -l purge -d "Purges $Z_DATA"
- complete -c $Z_CMD -s r -l rank -d "Searches by rank, cd"
- complete -c $Z_CMD -s t -l recent -d "Searches by recency, cd"
- complete -c $Z_CMD -s h -l help -d "Print help"
- complete -c $Z_CMD -s x -l delete -d "Removes the current directory from $Z_DATA"
-end
diff --git a/dot_config/private_fish/functions/_autopair_backspace.fish b/dot_config/private_fish/functions/_autopair_backspace.fish
deleted file mode 100644
index a43fa79..0000000
--- a/dot_config/private_fish/functions/_autopair_backspace.fish
+++ /dev/null
@@ -1,9 +0,0 @@
-function _autopair_backspace
- set --local index (commandline --cursor)
- set --local buffer (commandline)
-
- test $index -ge 1 &&
- contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs &&
- commandline --function delete-char
- commandline --function backward-delete-char
-end
diff --git a/dot_config/private_fish/functions/_autopair_insert_left.fish b/dot_config/private_fish/functions/_autopair_insert_left.fish
deleted file mode 100644
index f078e86..0000000
--- a/dot_config/private_fish/functions/_autopair_insert_left.fish
+++ /dev/null
@@ -1,13 +0,0 @@
-function _autopair_insert_left --argument-names left right
- set --local buffer (commandline)
- set --local before (commandline --cut-at-cursor)
-
- commandline --insert -- $left
-
- switch "$buffer"
- case "$before"{," "\*,$autopair_right\*}
- set --local index (commandline --cursor)
- commandline --insert -- $right
- commandline --cursor $index
- end
-end
diff --git a/dot_config/private_fish/functions/_autopair_insert_right.fish b/dot_config/private_fish/functions/_autopair_insert_right.fish
deleted file mode 100644
index a0bd61c..0000000
--- a/dot_config/private_fish/functions/_autopair_insert_right.fish
+++ /dev/null
@@ -1,11 +0,0 @@
-function _autopair_insert_right --argument-names key
- set --local buffer (commandline)
- set --local before (commandline --cut-at-cursor)
-
- switch "$buffer"
- case "$before$key"\*
- commandline --cursor (math (commandline --cursor) + 1)
- case \*
- commandline --insert -- $key
- end
-end
diff --git a/dot_config/private_fish/functions/_autopair_insert_same.fish b/dot_config/private_fish/functions/_autopair_insert_same.fish
deleted file mode 100644
index 27f971d..0000000
--- a/dot_config/private_fish/functions/_autopair_insert_same.fish
+++ /dev/null
@@ -1,20 +0,0 @@
-function _autopair_insert_same --argument-names key
- set --local buffer (commandline)
- set --local index (commandline --cursor)
- set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer")
-
- if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0
- test $key = $next && commandline --cursor (math $index + 1) && return
-
- commandline --insert -- $key
-
- if test $index -lt 1 ||
- contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left &&
- contains -- $next "" " " $autopair_right
- commandline --insert -- $key
- commandline --cursor (math $index + 1)
- end
- else
- commandline --insert -- $key
- end
-end
diff --git a/dot_config/private_fish/functions/_autopair_tab.fish b/dot_config/private_fish/functions/_autopair_tab.fish
deleted file mode 100644
index f2ab8eb..0000000
--- a/dot_config/private_fish/functions/_autopair_tab.fish
+++ /dev/null
@@ -1,7 +0,0 @@
-function _autopair_tab
- commandline --paging-mode && down-or-search && return
-
- string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) &&
- commandline --function end-of-line --function backward-delete-char
- commandline --function complete
-end
diff --git a/dot_config/private_fish/functions/_fzf_configure_bindings_help.fish b/dot_config/private_fish/functions/_fzf_configure_bindings_help.fish
deleted file mode 100644
index ecfe68e..0000000
--- a/dot_config/private_fish/functions/_fzf_configure_bindings_help.fish
+++ /dev/null
@@ -1,43 +0,0 @@
-function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings."
- echo "\
-USAGE:
- fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...]
-
-DESCRIPTION
- fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it
- previously installed. It installs bindings for both default and insert modes. fzf.fish executes
- it without options on fish startup to install the out-of-the-box key bindings.
-
- By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding
- can be configured using a namesake corresponding option:
- COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION
- Search Directory | Ctrl+Alt+F (F for file) | --directory
- Search Git Log | Ctrl+Alt+L (L for log) | --git_log
- Search Git Status | Ctrl+Alt+S (S for status) | --git_status
- Search History | Ctrl+R (R for reverse) | --history
- Search Processes | Ctrl+Alt+P (P for process) | --processes
- Search Variables | Ctrl+V (V for variable) | --variables
- Override a command's binding by specifying its corresponding option with the desired key
- sequence. Disable a command's binding by specifying its corresponding option with no value.
-
- Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly
- executed multiple times. Once the desired fzf_configure_bindings command has been found, add it
- to your config.fish in order to persist the customized bindings.
-
- In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an
- equals sign between an option's name and value. However, it does not validate key sequences.
-
- Pass -h or --help to print this help message and exit.
-
-EXAMPLES
- Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V
- \$ fzf_configure_bindings --directory=\cf --variables=\e\cv
- Default bindings but disable Search History
- \$ fzf_configure_bindings --history=
- An agglomeration of different options
- \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes=
-
-SEE Also
- To learn more about fish key bindings, see bind(1) and fish_key_reader(1).
-"
-end
diff --git a/dot_config/private_fish/functions/_fzf_extract_var_info.fish b/dot_config/private_fish/functions/_fzf_extract_var_info.fish
deleted file mode 100644
index dd4e952..0000000
--- a/dot_config/private_fish/functions/_fzf_extract_var_info.fish
+++ /dev/null
@@ -1,15 +0,0 @@
-# helper function for _fzf_search_variables
-function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output."
- # Extract only the lines about the variable, all of which begin with either
- # $variable_name: ...or... $variable_name[
- string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
-
- # Strip the variable name prefix, including ": " for scope info lines
- string replace --regex "^\\\$$variable_name(?:: )?" '' |
-
- # Distill the lines of values, replacing...
- # [1]: |value|
- # ...with...
- # [1] value
- string replace --regex ": \|(.*)\|" ' $1'
-end
diff --git a/dot_config/private_fish/functions/_fzf_preview_changed_file.fish b/dot_config/private_fish/functions/_fzf_preview_changed_file.fish
deleted file mode 100644
index a13219b..0000000
--- a/dot_config/private_fish/functions/_fzf_preview_changed_file.fish
+++ /dev/null
@@ -1,49 +0,0 @@
-# helper for _fzf_search_git_status
-# arg should be a line from git status --short, e.g.
-# MM functions/_fzf_preview_changed_file.fish
-# D README.md
-# R LICENSE -> "New License"
-function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file."
- # remove quotes because they'll be interpreted literally by git diff
- # no need to requote when referencing $path because fish does not perform word splitting
- # https://fishshell.com/docs/current/fish_for_bash_users.html
- set -l path (string unescape (string sub --start 4 $path_status))
- # first letter of short format shows index, second letter shows working tree
- # https://git-scm.com/docs/git-status/2.35.0#_short_format
- set -l index_status (string sub --length 1 $path_status)
- set -l working_tree_status (string sub --start 2 --length 1 $path_status)
-
- set diff_opts --color=always
-
- if test $index_status = '?'
- _fzf_report_diff_type Untracked
- _fzf_preview_file $path
- else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU
- # Unmerged statuses taken directly from git status help's short format table
- # Unmerged statuses are mutually exclusive with other statuses, so if we see
- # these, then safe to assume the path is unmerged
- _fzf_report_diff_type Unmerged
- git diff $diff_opts -- $path
- else
- if test $index_status != ' '
- _fzf_report_diff_type Staged
-
- # renames are only detected in the index, never working tree, so only need to test for it here
- # https://stackoverflow.com/questions/73954214
- if test $index_status = R
- # diff the post-rename path with the original path, otherwise the diff will show the entire file as being added
- set orig_and_new_path (string split --max 1 -- ' -> ' $path)
- git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2]
- # path currently has the form of "original -> current", so we need to correct it before it's used below
- set path $orig_and_new_path[2]
- else
- git diff --staged $diff_opts -- $path
- end
- end
-
- if test $working_tree_status != ' '
- _fzf_report_diff_type Unstaged
- git diff $diff_opts -- $path
- end
- end
-end
diff --git a/dot_config/private_fish/functions/_fzf_preview_file.fish b/dot_config/private_fish/functions/_fzf_preview_file.fish
deleted file mode 100644
index eaa68d0..0000000
--- a/dot_config/private_fish/functions/_fzf_preview_file.fish
+++ /dev/null
@@ -1,43 +0,0 @@
-# helper function for _fzf_search_directory and _fzf_search_git_status
-function _fzf_preview_file --description "Print a preview for the given file based on its file type."
- # because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file
- # as one argument, we collect all the arguments into one single variable and treat that as the path
- set file_path $argv
-
- if test -L "$file_path" # symlink
- # notify user and recurse on the target of the symlink, which can be any of these file types
- set -l target_path (realpath "$file_path")
-
- set_color yellow
- echo "'$file_path' is a symlink to '$target_path'."
- set_color normal
-
- _fzf_preview_file "$target_path"
- else if test -f "$file_path" # regular file
- if set --query fzf_preview_file_cmd
- # need to escape quotes to make sure eval receives file_path as a single arg
- eval "$fzf_preview_file_cmd '$file_path'"
- else
- bat --style=numbers --color=always "$file_path"
- end
- else if test -d "$file_path" # directory
- if set --query fzf_preview_dir_cmd
- # see above
- eval "$fzf_preview_dir_cmd '$file_path'"
- else
- # -A list hidden files as well, except for . and ..
- # -F helps classify files by appending symbols after the file name
- command ls -A -F "$file_path"
- end
- else if test -c "$file_path"
- _fzf_report_file_type "$file_path" "character device file"
- else if test -b "$file_path"
- _fzf_report_file_type "$file_path" "block device file"
- else if test -S "$file_path"
- _fzf_report_file_type "$file_path" socket
- else if test -p "$file_path"
- _fzf_report_file_type "$file_path" "named pipe"
- else
- echo "$file_path doesn't exist." >&2
- end
-end
diff --git a/dot_config/private_fish/functions/_fzf_report_diff_type.fish b/dot_config/private_fish/functions/_fzf_report_diff_type.fish
deleted file mode 100644
index 3463c3f..0000000
--- a/dot_config/private_fish/functions/_fzf_report_diff_type.fish
+++ /dev/null
@@ -1,18 +0,0 @@
-# helper for _fzf_preview_changed_file
-# prints out something like
-# ╭────────╮
-# │ Staged │
-# ╰────────╯
-function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch."
- # number of "-" to draw is the length of the string to box + 2 for padding
- set repeat_count (math 2 + (string length $diff_type))
- set line (string repeat --count $repeat_count ─)
- set top_border ╭$line╮
- set btm_border ╰$line╯
-
- set_color yellow
- echo $top_border
- echo "│ $diff_type │"
- echo $btm_border
- set_color normal
-end
diff --git a/dot_config/private_fish/functions/_fzf_report_file_type.fish b/dot_config/private_fish/functions/_fzf_report_file_type.fish
deleted file mode 100644
index 49e02e1..0000000
--- a/dot_config/private_fish/functions/_fzf_report_file_type.fish
+++ /dev/null
@@ -1,6 +0,0 @@
-# helper function for _fzf_preview_file
-function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file."
- set_color red
- echo "Cannot preview '$file_path': it is a $file_type."
- set_color normal
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_directory.fish b/dot_config/private_fish/functions/_fzf_search_directory.fish
deleted file mode 100644
index 15085be..0000000
--- a/dot_config/private_fish/functions/_fzf_search_directory.fish
+++ /dev/null
@@ -1,34 +0,0 @@
-function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths."
- # Directly use fd binary to avoid output buffering delay caused by a fd alias, if any.
- # Debian-based distros install fd as fdfind and the fd package is something else, so
- # check for fdfind first. Fall back to "fd" for a clear error message.
- set fd_cmd (command -v fdfind || command -v fd || echo "fd")
- set --append fd_cmd --color=always $fzf_fd_opts
-
- # $fzf_dir_opts is the deprecated version of $fzf_directory_opts
- set fzf_arguments --multi --ansi $fzf_dir_opts $fzf_directory_opts
- set token (commandline --current-token)
- # expand any variables or leading tilde (~) in the token
- set expanded_token (eval echo -- $token)
- # unescape token because it's already quoted so backslashes will mess up the path
- set unescaped_exp_token (string unescape -- $expanded_token)
-
- # If the current token is a directory and has a trailing slash,
- # then use it as fd's base directory.
- if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token"
- set --append fd_cmd --base-directory=$unescaped_exp_token
- # use the directory name as fzf's prompt to indicate the search is limited to that directory
- set --prepend fzf_arguments --prompt="Search Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}"
- set file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
- else
- set --prepend fzf_arguments --prompt="Search Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}'
- set file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
- end
-
-
- if test $status -eq 0
- commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_git_log.fish b/dot_config/private_fish/functions/_fzf_search_git_log.fish
deleted file mode 100644
index a158b02..0000000
--- a/dot_config/private_fish/functions/_fzf_search_git_log.fish
+++ /dev/null
@@ -1,30 +0,0 @@
-function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash."
- if not git rev-parse --git-dir >/dev/null 2>&1
- echo '_fzf_search_git_log: Not in a git repository.' >&2
- else
- if not set --query fzf_git_log_format
- # %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below
- set fzf_git_log_format '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)'
- end
- set selected_log_lines (
- git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \
- _fzf_wrapper --ansi \
- --multi \
- --tiebreak=index \
- --prompt="Search Git Log> " \
- --preview='git show --color=always --stat --patch {1}' \
- --query=(commandline --current-token) \
- $fzf_git_log_opts
- )
- if test $status -eq 0
- for line in $selected_log_lines
- set abbreviated_commit_hash (string split --field 1 " " $line)
- set full_commit_hash (git rev-parse $abbreviated_commit_hash)
- set --append commit_hashes $full_commit_hash
- end
- commandline --current-token --replace (string join ' ' $commit_hashes)
- end
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_git_status.fish b/dot_config/private_fish/functions/_fzf_search_git_status.fish
deleted file mode 100644
index 9e51453..0000000
--- a/dot_config/private_fish/functions/_fzf_search_git_status.fish
+++ /dev/null
@@ -1,36 +0,0 @@
-function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths."
- if not git rev-parse --git-dir >/dev/null 2>&1
- echo '_fzf_search_git_status: Not in a git repository.' >&2
- else
- set selected_paths (
- # Pass configuration color.status=always to force status to use colors even though output is sent to a pipe
- git -c color.status=always status --short |
- _fzf_wrapper --ansi \
- --multi \
- --prompt="Search Git Status> " \
- --query=(commandline --current-token) \
- --preview='_fzf_preview_changed_file {}' \
- --nth="2.." \
- $fzf_git_status_opts
- )
- if test $status -eq 0
- # git status --short automatically escapes the paths of most files for us so not going to bother trying to handle
- # the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping")
- set cleaned_paths
-
- for path in $selected_paths
- if test (string sub --length 1 $path) = R
- # path has been renamed and looks like "R LICENSE -> LICENSE.md"
- # extract the path to use from after the arrow
- set --append cleaned_paths (string split -- "-> " $path)[-1]
- else
- set --append cleaned_paths (string sub --start=4 $path)
- end
- end
-
- commandline --current-token --replace -- (string join ' ' $cleaned_paths)
- end
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_history.fish b/dot_config/private_fish/functions/_fzf_search_history.fish
deleted file mode 100644
index 27cf4f1..0000000
--- a/dot_config/private_fish/functions/_fzf_search_history.fish
+++ /dev/null
@@ -1,31 +0,0 @@
-function _fzf_search_history --description "Search command history. Replace the command line with the selected command."
- # history merge incorporates history changes from other fish sessions
- # it errors out if called in private mode
- if test -z "$fish_private_mode"
- builtin history merge
- end
-
- # Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line
- set commands_selected (
- # Reference https://devhints.io/strftime to understand strftime format symbols
- builtin history --null --show-time="%m-%d %H:%M:%S │ " |
- _fzf_wrapper --read0 \
- --print0 \
- --multi \
- --tiebreak=index \
- --prompt="Search History> " \
- --query=(commandline) \
- --preview="echo -- {4..} | fish_indent --ansi" \
- --preview-window="bottom:3:wrap" \
- $fzf_history_opts |
- string split0 |
- # remove timestamps from commands selected
- string replace --regex '^\d\d-\d\d \d\d:\d\d:\d\d │ ' ''
- )
-
- if test $status -eq 0
- commandline --replace -- $commands_selected
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_processes.fish b/dot_config/private_fish/functions/_fzf_search_processes.fish
deleted file mode 100644
index 9424aad..0000000
--- a/dot_config/private_fish/functions/_fzf_search_processes.fish
+++ /dev/null
@@ -1,29 +0,0 @@
-function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process."
- # use all caps to be consistent with ps default format
- # snake_case because ps doesn't seem to allow spaces in the field names
- set ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command')
- set processes_selected (
- ps -A -opid,command | \
- _fzf_wrapper --multi \
- --prompt="Search Processes> " \
- --query (commandline --current-token) \
- --ansi \
- # first line outputted by ps is a header, so we need to mark it as so
- --header-lines=1 \
- # ps uses exit code 1 if the process was not found, in which case show an message explaining so
- --preview="ps -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \
- --preview-window="bottom:4:wrap" \
- $fzf_processes_opts
- )
-
- if test $status -eq 0
- for process in $processes_selected
- set --append pids_selected (string split --no-empty --field=1 -- " " $process)
- end
-
- # string join to replace the newlines outputted by string split with spaces
- commandline --current-token --replace -- (string join ' ' $pids_selected)
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_search_variables.fish b/dot_config/private_fish/functions/_fzf_search_variables.fish
deleted file mode 100644
index eda2453..0000000
--- a/dot_config/private_fish/functions/_fzf_search_variables.fish
+++ /dev/null
@@ -1,48 +0,0 @@
-# This function expects the following two arguments:
-# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables
-# argument 2 = output of (set --names | psub), i.e. a file with all variable names
-function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable."
- if test -z "$set_names_output"
- printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2
-
- commandline --function repaint
- return 22 # 22 means invalid argument in POSIX
- end
-
- # Exclude the history variable from being piped into fzf because
- # 1. it's not included in $set_names_output
- # 2. it tends to be a very large value => increases computation time
- # 3._fzf_search_history is a much better way to examine history anyway
- set all_variable_names (string match --invert history <$set_names_output)
-
- set current_token (commandline --current-token)
- # Use the current token to pre-populate fzf's query. If the current token begins
- # with a $, remove it from the query so that it will better match the variable names
- set cleaned_curr_token (string replace -- '$' '' $current_token)
-
- set variable_names_selected (
- printf '%s\n' $all_variable_names |
- _fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \
- --prompt="Search Variables> " \
- --preview-window="wrap" \
- --multi \
- --query=$cleaned_curr_token \
- # $fzf_shell_vars_opts is the deprecated version of $fzf_variables_opts
- $fzf_shell_vars_opts $fzf_variables_opts
- )
-
- if test $status -eq 0
- # If the current token begins with a $, do not overwrite the $ when
- # replacing the current token with the selected variable.
- # Uses brace expansion to prepend $ to each variable name.
- commandline --current-token --replace (
- if string match --quiet -- '$*' $current_token
- string join " " \${$variable_names_selected}
- else
- string join " " $variable_names_selected
- end
- )
- end
-
- commandline --function repaint
-end
diff --git a/dot_config/private_fish/functions/_fzf_wrapper.fish b/dot_config/private_fish/functions/_fzf_wrapper.fish
deleted file mode 100644
index a928701..0000000
--- a/dot_config/private_fish/functions/_fzf_wrapper.fish
+++ /dev/null
@@ -1,20 +0,0 @@
-function _fzf_wrapper --description "Prepares some environment variables before executing fzf."
- # Make sure fzf uses fish to execute preview commands, some of which
- # are autoloaded fish functions so don't exist in other shells.
- # Use --local so that it doesn't clobber SHELL outside of this function.
- set --local --export SHELL (command --search fish)
-
- # If FZF_DEFAULT_OPTS is not set, then set some sane defaults.
- # See https://github.com/junegunn/fzf#environment-variables
- if not set --query FZF_DEFAULT_OPTS
- # cycle allows jumping between the first and last results, making scrolling faster
- # layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env
- # border shows where the fzf window begins and ends
- # height=90% leaves space to see the current command and some scrollback, maintaining context of work
- # preview-window=wrap wraps long lines in the preview window, making reading easier
- # marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >)
- set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
- end
-
- fzf $argv
-end
diff --git a/dot_config/private_fish/functions/_nvm_index_update.fish b/dot_config/private_fish/functions/_nvm_index_update.fish
deleted file mode 100644
index c1bbe28..0000000
--- a/dot_config/private_fish/functions/_nvm_index_update.fish
+++ /dev/null
@@ -1,20 +0,0 @@
-function _nvm_index_update
- test ! -d $nvm_data && command mkdir -p $nvm_data
-
- set --local index $nvm_data/.index
-
- if not command curl --location --silent $nvm_mirror/index.tab >$index.temp
- command rm -f $index.temp
- echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
- return 1
- end
-
- command awk -v OFS=\t '
- /v0.9.12/ { exit } # Unsupported
- NR > 1 {
- print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
- }
- ' $index.temp >$index
-
- command rm -f $index.temp
-end
diff --git a/dot_config/private_fish/functions/_nvm_list.fish b/dot_config/private_fish/functions/_nvm_list.fish
deleted file mode 100644
index fb5ab0e..0000000
--- a/dot_config/private_fish/functions/_nvm_list.fish
+++ /dev/null
@@ -1,11 +0,0 @@
-function _nvm_list
- set --local versions $nvm_data/*
- set --query versions[1] &&
- string match --entire --regex -- (string match --regex -- "v\d.+" $versions |
- string escape --style=regex |
- string join "|"
- ) <$nvm_data/.index
-
- command --all node |
- string match --quiet --invert --regex -- "^$nvm_data" && echo system
-end
diff --git a/dot_config/private_fish/functions/_nvm_version_activate.fish b/dot_config/private_fish/functions/_nvm_version_activate.fish
deleted file mode 100644
index f7dfef7..0000000
--- a/dot_config/private_fish/functions/_nvm_version_activate.fish
+++ /dev/null
@@ -1,4 +0,0 @@
-function _nvm_version_activate --argument-names ver
- set --global --export nvm_current_version $ver
- set --prepend PATH $nvm_data/$ver/bin
-end
diff --git a/dot_config/private_fish/functions/_nvm_version_deactivate.fish b/dot_config/private_fish/functions/_nvm_version_deactivate.fish
deleted file mode 100644
index 24dd36e..0000000
--- a/dot_config/private_fish/functions/_nvm_version_deactivate.fish
+++ /dev/null
@@ -1,5 +0,0 @@
-function _nvm_version_deactivate --argument-names ver
- test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
- set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
- set --erase PATH[$index]
-end
diff --git a/dot_config/private_fish/functions/fish_user_key_bindings.fish b/dot_config/private_fish/functions/fish_user_key_bindings.fish
deleted file mode 100644
index 350a9da..0000000
--- a/dot_config/private_fish/functions/fish_user_key_bindings.fish
+++ /dev/null
@@ -1,3 +0,0 @@
-function fish_user_key_bindings
- fzf_key_bindings
-end
diff --git a/dot_config/private_fish/functions/fisher.fish b/dot_config/private_fish/functions/fisher.fish
deleted file mode 100644
index c0a86fa..0000000
--- a/dot_config/private_fish/functions/fisher.fish
+++ /dev/null
@@ -1,240 +0,0 @@
-function fisher --argument-names cmd --description "A plugin manager for Fish"
- set --query fisher_path || set --local fisher_path $__fish_config_dir
- set --local fisher_version 4.4.3
- set --local fish_plugins $__fish_config_dir/fish_plugins
-
- switch "$cmd"
- case -v --version
- echo "fisher, version $fisher_version"
- case "" -h --help
- echo "Usage: fisher install Install plugins"
- echo " fisher remove Remove installed plugins"
- echo " fisher update Update installed plugins"
- echo " fisher update Update all installed plugins"
- echo " fisher list [] List installed plugins matching regex"
- echo "Options:"
- echo " -v or --version Print version"
- echo " -h or --help Print this help message"
- echo "Variables:"
- echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
- case ls list
- string match --entire --regex -- "$argv[2]" $_fisher_plugins
- case install update remove
- isatty || read --local --null --array stdin && set --append argv $stdin
-
- set --local install_plugins
- set --local update_plugins
- set --local remove_plugins
- set --local arg_plugins $argv[2..-1]
- set --local old_plugins $_fisher_plugins
- set --local new_plugins
-
- test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
-
- if ! set --query argv[2]
- if test "$cmd" != update
- echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
- else if ! set --query file_plugins
- echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
- end
- set arg_plugins $file_plugins
- end
-
- for plugin in $arg_plugins
- set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
- contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
- end
-
- if set --query argv[2]
- for plugin in $new_plugins
- if contains -- "$plugin" $old_plugins
- test "$cmd" = remove &&
- set --append remove_plugins $plugin ||
- set --append update_plugins $plugin
- else if test "$cmd" = install
- set --append install_plugins $plugin
- else
- echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
- end
- end
- else
- for plugin in $new_plugins
- contains -- "$plugin" $old_plugins &&
- set --append update_plugins $plugin ||
- set --append install_plugins $plugin
- end
-
- for plugin in $old_plugins
- contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
- end
- end
-
- set --local pid_list
- set --local source_plugins
- set --local fetch_plugins $update_plugins $install_plugins
- set --local fish_path (status fish-path)
-
- echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
-
- for plugin in $fetch_plugins
- set --local source (command mktemp -d)
- set --append source_plugins $source
-
- command mkdir -p $source/{completions,conf.d,themes,functions}
-
- $fish_path --command "
- if test -e $plugin
- command cp -Rf $plugin/* $source
- else
- set temp (command mktemp -d)
- set repo (string split -- \@ $plugin) || set repo[2] HEAD
-
- if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
- set name (string split -- / \$path)[-1]
- set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
- else
- set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
- end
-
- echo Fetching (set_color --underline)\$url(set_color normal)
-
- if curl --silent -L \$url | tar -xzC \$temp -f - 2>/dev/null
- command cp -Rf \$temp/*/* $source
- else
- echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
- command rm -rf $source
- end
-
- command rm -rf \$temp
- end
-
- set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
- " &
-
- set --append pid_list (jobs --last --pid)
- end
-
- wait $pid_list 2>/dev/null
-
- for plugin in $fetch_plugins
- if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
- if set --local index (contains --index -- "$plugin" $install_plugins)
- set --erase install_plugins[$index]
- else
- set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
- end
- end
- end
-
- for plugin in $update_plugins $remove_plugins
- if set --local index (contains --index -- "$plugin" $_fisher_plugins)
- set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
-
- if contains -- "$plugin" $remove_plugins
- for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
- emit {$name}_uninstall
- end
- printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
- set --erase _fisher_plugins[$index]
- end
-
- command rm -rf (string replace -- \~ ~ $$plugin_files_var)
-
- functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
-
- for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
- complete --erase --command $name
- end
-
- set --erase $plugin_files_var
- end
- end
-
- if set --query update_plugins[1] || set --query install_plugins[1]
- command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
- end
-
- for plugin in $update_plugins $install_plugins
- set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
- set --local files $source/{functions,themes,conf.d,completions}/*
-
- if set --local index (contains --index -- $plugin $install_plugins)
- set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
- set --local conflict_files
-
- for file in (string replace -- $source/ $fisher_path/ $files)
- contains -- $file $user_files && set --append conflict_files $file
- end
-
- if set --query conflict_files[1] && set --erase install_plugins[$index]
- echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
- continue
- end
- end
-
- for file in (string replace -- $source/ "" $files)
- command cp -RLf $source/$file $fisher_path/$file
- end
-
- set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
-
- set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
-
- contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
- contains -- $plugin $install_plugins && set --local event install || set --local event update
-
- printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
-
- for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
- source $file
- if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
- emit {$name}_$event
- end
- end
- end
-
- command rm -rf $source_plugins
-
- if set --query _fisher_plugins[1]
- set --local commit_plugins
-
- for plugin in $file_plugins
- contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
- end
-
- for plugin in $_fisher_plugins
- contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
- end
-
- printf "%s\n" $commit_plugins >$fish_plugins
- else
- set --erase _fisher_plugins
- command rm -f $fish_plugins
- end
-
- set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
-
- test "$total" != "0 0 0" && echo (string join ", " (
- test $total[1] = 0 || echo "Installed $total[1]") (
- test $total[2] = 0 || echo "Updated $total[2]") (
- test $total[3] = 0 || echo "Removed $total[3]")
- ) plugin/s
- case \*
- echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
- end
-end
-
-if ! set --query _fisher_upgraded_to_4_4
- set --universal _fisher_upgraded_to_4_4
- if functions --query _fisher_list
- set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
- command rm -rf $XDG_DATA_HOME/fisher
- functions --erase _fisher_{list,plugin_parse}
- fisher update >/dev/null 2>/dev/null
- else
- for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
- set $var (string replace -- ~ \~ $$var)
- end
- functions --erase _fisher_fish_postexec
- end
-end
diff --git a/dot_config/private_fish/functions/fzf_configure_bindings.fish b/dot_config/private_fish/functions/fzf_configure_bindings.fish
deleted file mode 100644
index ec24f73..0000000
--- a/dot_config/private_fish/functions/fzf_configure_bindings.fish
+++ /dev/null
@@ -1,46 +0,0 @@
-# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect
-# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1
-function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options."
- # no need to install bindings if not in interactive mode or running tests
- status is-interactive || test "$CI" = true; or return
-
- set options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?'
- argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null
- if test $status -ne 0
- echo "Invalid option or a positional argument was provided." >&2
- _fzf_configure_bindings_help
- return 22
- else if set --query _flag_help
- _fzf_configure_bindings_help
- return
- else
- # Initialize with default key sequences and then override or disable them based on flags
- # index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = processes, 6 = variables
- set key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \c = control, \e = escape
- set --query _flag_directory && set key_sequences[1] "$_flag_directory"
- set --query _flag_git_log && set key_sequences[2] "$_flag_git_log"
- set --query _flag_git_status && set key_sequences[3] "$_flag_git_status"
- set --query _flag_history && set key_sequences[4] "$_flag_history"
- set --query _flag_processes && set key_sequences[5] "$_flag_processes"
- set --query _flag_variables && set key_sequences[6] "$_flag_variables"
-
- # If fzf bindings already exists, uninstall it first for a clean slate
- if functions --query _fzf_uninstall_bindings
- _fzf_uninstall_bindings
- end
-
- for mode in default insert
- test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory
- test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log
- test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status
- test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history
- test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] _fzf_search_processes
- test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command"
- end
-
- function _fzf_uninstall_bindings --inherit-variable key_sequences
- bind --erase -- $key_sequences
- bind --erase --mode insert -- $key_sequences
- end
- end
-end
diff --git a/dot_config/private_fish/functions/nvm.fish b/dot_config/private_fish/functions/nvm.fish
deleted file mode 100644
index 131a030..0000000
--- a/dot_config/private_fish/functions/nvm.fish
+++ /dev/null
@@ -1,230 +0,0 @@
-function nvm --description "Node version manager"
- for silent in --silent -s
- if set --local index (contains --index -- $silent $argv)
- set --erase argv[$index] && break
- end
- set --erase silent
- end
-
- set --local cmd $argv[1]
- set --local ver $argv[2]
-
- if set --query silent && ! set --query cmd[1]
- echo "nvm: Version number not specified (see nvm -h for usage)" >&2
- return 1
- end
-
- if ! set --query ver[1] && contains -- "$cmd" install use
- for file in .nvmrc .node-version
- set file (_nvm_find_up $PWD $file) && read ver <$file && break
- end
-
- if ! set --query ver[1]
- echo "nvm: Invalid version or missing \".nvmrc\" file" >&2
- return 1
- end
- end
-
- set --local their_version $ver
-
- switch "$cmd"
- case -v --version
- echo "nvm, version 2.2.11"
- case "" -h --help
- echo "Usage: nvm install Download and activate the specified Node version"
- echo " nvm install Install version from nearest .nvmrc file"
- echo " nvm use Activate a version in the current shell"
- echo " nvm use Activate version from nearest .nvmrc file"
- echo " nvm list List installed versions"
- echo " nvm list-remote List versions available to install"
- echo " nvm list-remote List versions matching a given regular expression"
- echo " nvm current Print the currently-active version"
- echo " nvm uninstall Uninstall a version"
- echo "Options:"
- echo " -s or --silent Suppress standard output"
- echo " -v or --version Print version"
- echo " -h or --help Print this help message"
- echo "Variables:"
- echo " nvm_arch Override architecture, e.g. x64-musl"
- echo " nvm_mirror Use a mirror of the Node binaries"
- echo " nvm_default_version Set the default version for new shells"
- echo " nvm_default_packages Install a list of packages every time you install a Node version"
- case install
- _nvm_index_update
-
- string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias
-
- if ! set --query ver[1]
- echo "nvm: Invalid version number or alias: \"$their_version\"" >&2
- return 1
- end
-
- if test ! -e $nvm_data/$ver
- set --local os (command uname -s | string lower)
- set --local ext tar.gz
- set --local arch (command uname -m)
-
- switch $os
- case aix
- set arch ppc64
- case sunos
- case linux
- case darwin
- case {MSYS_NT,MINGW\*_NT}\*
- set os win
- set ext zip
- case \*
- echo "nvm: Unsupported operating system: \"$os\"" >&2
- return 1
- end
-
- switch $arch
- case i\*86
- set arch x86
- case x86_64
- set arch x64
- case arm64
- string match --regex --quiet "v(?\d+)" $ver
- if test "$os" = darwin -a $major -lt 16
- set arch x64
- end
- case armv6 armv6l
- set arch armv6l
- case armv7 armv7l
- set arch armv7l
- case armv8 armv8l aarch64
- set arch arm64
- end
-
- set --query nvm_arch && set arch $nvm_arch
-
- set --local dir "node-$ver-$os-$arch"
- set --local url $nvm_mirror/$ver/$dir.$ext
-
- command mkdir -p $nvm_data/$ver
-
- if ! set --query silent
- echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias"
- echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
- end
-
- if ! command curl $silent --progress-bar --location $url |
- command tar --extract --gzip --directory $nvm_data/$ver 2>/dev/null
- command rm -rf $nvm_data/$ver
- echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
- return 1
- end
-
- set --query silent || echo -en "\033[F\33[2K\x1b[0m"
-
- if test "$os" = win
- command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin
- else
- command mv $nvm_data/$ver/$dir/* $nvm_data/$ver
- command rm -rf $nvm_data/$ver/$dir
- end
- end
-
- if test $ver != "$nvm_current_version"
- set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
- _nvm_version_activate $ver
-
- set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages
- end
-
- set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
- case use
- test $ver = default && set ver $nvm_default_version
- _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
-
- if ! set --query ver[1]
- echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2
- return 1
- end
-
- if test $ver != "$nvm_current_version"
- set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
- test $ver != system && _nvm_version_activate $ver
- end
-
- set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
- case uninstall
- if test -z "$ver"
- echo "nvm: Not enough arguments for command: \"$cmd\"" >&2
- return 1
- end
-
- test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version
-
- _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
-
- if ! set -q ver[1]
- echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2
- return 1
- end
-
- set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node")
-
- _nvm_version_deactivate $ver
-
- command rm -rf $nvm_data/$ver
- case current
- _nvm_current
- case ls list
- _nvm_list | _nvm_list_format (_nvm_current) $argv[2]
- case lsr {ls,list}-remote
- _nvm_index_update || return
- _nvm_list | command awk '
- FILENAME == "-" && (is_local[$1] = FNR == NR) { next } {
- print $0 (is_local[$1] ? " ✓" : "")
- }
- ' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2]
- case \*
- echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2
- return 1
- end
-end
-
-function _nvm_find_up --argument-names path file
- test -e "$path/$file" && echo $path/$file || begin
- test ! -z "$path" || return
- _nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
- end
-end
-
-function _nvm_version_match --argument-names ver
- string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
- string replace --filter --regex -- '^v?(\d+)' 'v$1' |
- string escape --style=regex ||
- string lower '\b'$ver'(?:/\w+)?$'
-end
-
-function _nvm_list_format --argument-names current regex
- command awk -v current="$current" -v regex="$regex" '
- $0 ~ regex {
- aliases[versions[i++] = $1] = $2 " " $3
- pad = (n = length($1)) > pad ? n : pad
- }
- END {
- if (!i) exit 1
- while (i--)
- printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n",
- versions[i], aliases[versions[i]])
- }
- '
-end
-
-function _nvm_current
- command --search --quiet node || return
- set --query nvm_current_version && echo $nvm_current_version || echo system
-end
-
-function _nvm_node_info
- set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm)))
- test -f $npm_path/package.json || set --local npm_version_default (command npm --version)
- command node --eval "
- console.log(process.version)
- console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
- console.log(process.execPath.replace(require('os').homedir(), '~'))
- "
-end
diff --git a/dot_config/private_fish/functions/symlink_fzf_key_bindings.fish b/dot_config/private_fish/functions/symlink_fzf_key_bindings.fish
deleted file mode 100644
index 010e360..0000000
--- a/dot_config/private_fish/functions/symlink_fzf_key_bindings.fish
+++ /dev/null
@@ -1 +0,0 @@
-/home/minhu/.fzf/shell/key-bindings.fish
diff --git a/dot_config/private_fish/themes/.keep b/dot_config/private_fish/themes/.keep
deleted file mode 100644
index e69de29..0000000