From 460623777663ffd8d02a5b6c7809b55edf65ad6e Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 28 Mar 2025 18:45:08 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-28 18:45:08 --- .../completions/fzf_configure_bindings.fish | 8 + .config/fish/completions/merge.fish | 20 + .config/fish/completions/move.fish | 26 + .config/fish/completions/projectdo.fish | 23 + .config/fish/completions/replay.fish | 2 + .config/fish/completions/spark.fish | 4 + .config/fish/completions/tag.fish | 31 + .config/fish/conf.d/.gitnow | 40 + .config/fish/conf.d/__async_prompt.fish | 201 +++++ .config/fish/conf.d/autopair.fish | 39 + .config/fish/conf.d/done.fish | 334 ++++++++ .config/fish/conf.d/fzf.fish | 28 + .config/fish/conf.d/gitnow.fish | 713 ++++++++++++++++++ .../fish/conf.d/puffer_fish_key_bindings.fish | 25 + .config/fish/conf.d/sponge.fish | 52 ++ .config/fish/conf.d/virtualfish-loader.fish | 4 + .config/fish/fish_plugins | 10 + .config/fish/fish_variables | 18 +- .../__gitnow_check_if_branch_exist.fish | 20 + .../fish/functions/__gitnow_clone_msg.fish | 17 + .../fish/functions/__gitnow_clone_params.fish | 18 + .../fish/functions/__gitnow_clone_repo.fish | 41 + .../__gitnow_current_branch_list.fish | 6 + .../__gitnow_current_branch_name.fish | 6 + .../functions/__gitnow_current_remote.fish | 7 + .../functions/__gitnow_get_clip_program.fish | 18 + ..._gitnow_get_latest_semver_release_tag.fish | 11 + .../functions/__gitnow_get_latest_tag.fish | 6 + .../functions/__gitnow_get_tags_ordered.fish | 8 + ...now_get_valid_semver_prerelease_value.fish | 6 + ...gitnow_get_valid_semver_release_value.fish | 6 + .../functions/__gitnow_gitflow_branch.fish | 16 + .../__gitnow_has_uncommited_changes.fish | 6 + .../functions/__gitnow_increment_number.fish | 12 + .../functions/__gitnow_is_git_repository.fish | 6 + .../fish/functions/__gitnow_is_number.fish | 6 + .../fish/functions/__gitnow_load_config.fish | 180 +++++ .../__gitnow_load_git_functions.fish | 8 + .config/fish/functions/__gitnow_manual.fish | 115 +++ .../__gitnow_msg_not_valid_repository.fish | 6 + .../functions/__gitnow_new_branch_switch.fish | 14 + .config/fish/functions/__gitnow_slugify.fish | 7 + .../fish/functions/_autopair_backspace.fish | 9 + .../fish/functions/_autopair_insert_left.fish | 13 + .../functions/_autopair_insert_right.fish | 11 + .../fish/functions/_autopair_insert_same.fish | 20 + .config/fish/functions/_autopair_tab.fish | 7 + .../_fzf_configure_bindings_help.fish | 43 ++ .../fish/functions/_fzf_extract_var_info.fish | 15 + .../functions/_fzf_preview_changed_file.fish | 49 ++ .config/fish/functions/_fzf_preview_file.fish | 43 ++ .../fish/functions/_fzf_report_diff_type.fish | 18 + .../fish/functions/_fzf_report_file_type.fish | 6 + .../fish/functions/_fzf_search_directory.fish | 33 + .../fish/functions/_fzf_search_git_log.fish | 36 + .../functions/_fzf_search_git_status.fish | 41 + .../fish/functions/_fzf_search_history.fish | 39 + .../fish/functions/_fzf_search_processes.fish | 32 + .../fish/functions/_fzf_search_variables.fish | 47 ++ .config/fish/functions/_fzf_wrapper.fish | 21 + .../functions/_puffer_fish_expand_bang.fish | 9 + .../functions/_puffer_fish_expand_dots.fish | 9 + .../_puffer_fish_expand_lastarg.fish | 9 + .../fish/functions/_sponge_clear_state.fish | 5 + .config/fish/functions/_sponge_on_exit.fish | 3 + .../fish/functions/_sponge_on_postexec.fish | 24 + .../fish/functions/_sponge_on_preexec.fish | 16 + .config/fish/functions/_sponge_on_prompt.fish | 5 + .../_sponge_remove_from_history.fish | 9 + .../functions/fzf_configure_bindings.fish | 46 ++ .config/fish/functions/projectdo_build.fish | 3 + .config/fish/functions/projectdo_run.fish | 3 + .config/fish/functions/projectdo_test.fish | 3 + .config/fish/functions/projectdo_tool.fish | 3 + .config/fish/functions/replay.fish | 48 ++ .config/fish/functions/spark.fish | 33 + .../fish/functions/sponge_filter_failed.fish | 11 + .../fish/functions/sponge_filter_matched.fish | 11 + 78 files changed, 2856 insertions(+), 1 deletion(-) create mode 100644 .config/fish/completions/fzf_configure_bindings.fish create mode 100644 .config/fish/completions/merge.fish create mode 100644 .config/fish/completions/move.fish create mode 100644 .config/fish/completions/projectdo.fish create mode 100644 .config/fish/completions/replay.fish create mode 100644 .config/fish/completions/spark.fish create mode 100644 .config/fish/completions/tag.fish create mode 100644 .config/fish/conf.d/.gitnow create mode 100644 .config/fish/conf.d/__async_prompt.fish create mode 100644 .config/fish/conf.d/autopair.fish create mode 100644 .config/fish/conf.d/done.fish create mode 100644 .config/fish/conf.d/fzf.fish create mode 100644 .config/fish/conf.d/gitnow.fish create mode 100644 .config/fish/conf.d/puffer_fish_key_bindings.fish create mode 100644 .config/fish/conf.d/sponge.fish create mode 100644 .config/fish/conf.d/virtualfish-loader.fish create mode 100644 .config/fish/functions/__gitnow_check_if_branch_exist.fish create mode 100644 .config/fish/functions/__gitnow_clone_msg.fish create mode 100644 .config/fish/functions/__gitnow_clone_params.fish create mode 100644 .config/fish/functions/__gitnow_clone_repo.fish create mode 100644 .config/fish/functions/__gitnow_current_branch_list.fish create mode 100644 .config/fish/functions/__gitnow_current_branch_name.fish create mode 100644 .config/fish/functions/__gitnow_current_remote.fish create mode 100644 .config/fish/functions/__gitnow_get_clip_program.fish create mode 100644 .config/fish/functions/__gitnow_get_latest_semver_release_tag.fish create mode 100644 .config/fish/functions/__gitnow_get_latest_tag.fish create mode 100644 .config/fish/functions/__gitnow_get_tags_ordered.fish create mode 100644 .config/fish/functions/__gitnow_get_valid_semver_prerelease_value.fish create mode 100644 .config/fish/functions/__gitnow_get_valid_semver_release_value.fish create mode 100644 .config/fish/functions/__gitnow_gitflow_branch.fish create mode 100644 .config/fish/functions/__gitnow_has_uncommited_changes.fish create mode 100644 .config/fish/functions/__gitnow_increment_number.fish create mode 100644 .config/fish/functions/__gitnow_is_git_repository.fish create mode 100644 .config/fish/functions/__gitnow_is_number.fish create mode 100644 .config/fish/functions/__gitnow_load_config.fish create mode 100644 .config/fish/functions/__gitnow_load_git_functions.fish create mode 100644 .config/fish/functions/__gitnow_manual.fish create mode 100644 .config/fish/functions/__gitnow_msg_not_valid_repository.fish create mode 100644 .config/fish/functions/__gitnow_new_branch_switch.fish create mode 100644 .config/fish/functions/__gitnow_slugify.fish create mode 100644 .config/fish/functions/_autopair_backspace.fish create mode 100644 .config/fish/functions/_autopair_insert_left.fish create mode 100644 .config/fish/functions/_autopair_insert_right.fish create mode 100644 .config/fish/functions/_autopair_insert_same.fish create mode 100644 .config/fish/functions/_autopair_tab.fish create mode 100644 .config/fish/functions/_fzf_configure_bindings_help.fish create mode 100644 .config/fish/functions/_fzf_extract_var_info.fish create mode 100644 .config/fish/functions/_fzf_preview_changed_file.fish create mode 100644 .config/fish/functions/_fzf_preview_file.fish create mode 100644 .config/fish/functions/_fzf_report_diff_type.fish create mode 100644 .config/fish/functions/_fzf_report_file_type.fish create mode 100644 .config/fish/functions/_fzf_search_directory.fish create mode 100644 .config/fish/functions/_fzf_search_git_log.fish create mode 100644 .config/fish/functions/_fzf_search_git_status.fish create mode 100644 .config/fish/functions/_fzf_search_history.fish create mode 100644 .config/fish/functions/_fzf_search_processes.fish create mode 100644 .config/fish/functions/_fzf_search_variables.fish create mode 100644 .config/fish/functions/_fzf_wrapper.fish create mode 100644 .config/fish/functions/_puffer_fish_expand_bang.fish create mode 100644 .config/fish/functions/_puffer_fish_expand_dots.fish create mode 100644 .config/fish/functions/_puffer_fish_expand_lastarg.fish create mode 100644 .config/fish/functions/_sponge_clear_state.fish create mode 100644 .config/fish/functions/_sponge_on_exit.fish create mode 100644 .config/fish/functions/_sponge_on_postexec.fish create mode 100644 .config/fish/functions/_sponge_on_preexec.fish create mode 100644 .config/fish/functions/_sponge_on_prompt.fish create mode 100644 .config/fish/functions/_sponge_remove_from_history.fish create mode 100644 .config/fish/functions/fzf_configure_bindings.fish create mode 100644 .config/fish/functions/projectdo_build.fish create mode 100644 .config/fish/functions/projectdo_run.fish create mode 100644 .config/fish/functions/projectdo_test.fish create mode 100644 .config/fish/functions/projectdo_tool.fish create mode 100644 .config/fish/functions/replay.fish create mode 100644 .config/fish/functions/spark.fish create mode 100644 .config/fish/functions/sponge_filter_failed.fish create mode 100644 .config/fish/functions/sponge_filter_matched.fish diff --git a/.config/fish/completions/fzf_configure_bindings.fish b/.config/fish/completions/fzf_configure_bindings.fish new file mode 100644 index 00000000..b38ef927 --- /dev/null +++ b/.config/fish/completions/fzf_configure_bindings.fish @@ -0,0 +1,8 @@ +complete fzf_configure_bindings --no-files +complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h" +complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory" +complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log" +complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status" +complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history" +complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes" +complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables" diff --git a/.config/fish/completions/merge.fish b/.config/fish/completions/merge.fish new file mode 100644 index 00000000..903ac39e --- /dev/null +++ b/.config/fish/completions/merge.fish @@ -0,0 +1,20 @@ +# GitNow โ€” Speed up your Git workflow. ๐Ÿ  +# https://github.com/joseluisq/gitnow + +# Merge command + +__gitnow_load_git_functions + +complete -f -x -c merge -a '(__fish_git_branches)' + +complete -f -x -c merge \ + -s h -l help \ + -d "Show information about the options for this command" + +complete -f -x -c merge \ + -s a -l abort \ + -d "Abort conflicted merge" + +complete -f -x -c merge \ + -s c -l continue \ + -d "Continue merge" diff --git a/.config/fish/completions/move.fish b/.config/fish/completions/move.fish new file mode 100644 index 00000000..88350ae9 --- /dev/null +++ b/.config/fish/completions/move.fish @@ -0,0 +1,26 @@ +# GitNow โ€” Speed up your Git workflow. ๐Ÿ  +# https://github.com/joseluisq/gitnow + +# Move command + +__gitnow_load_git_functions + +complete -f -x -c move -a '(__fish_git_branches)' + +complete -f -x -c move \ + -s h -l help \ + -d "Show information about the options for this command" + +complete -f -x -c move \ + -s p -l prev \ + -d "Switch to a previous branch using the `--no-apply-stash` option (equivalent to \"move -\")" + +complete -f -x -c move \ + -s n -l no-apply-stash \ + -a '(__fish_git_branches)' \ + -d "Switch to a local branch but without applying current stash" + +complete -f -x -c move \ + -s u -l upstream \ + -a '(__fish_git_branches)' \ + -d "Fetch a remote branch and switch to it applying current stash" diff --git a/.config/fish/completions/projectdo.fish b/.config/fish/completions/projectdo.fish new file mode 100644 index 00000000..41413b38 --- /dev/null +++ b/.config/fish/completions/projectdo.fish @@ -0,0 +1,23 @@ +complete -c projectdo --no-files + +set -l commands build run test tool + +# Options +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -s h -l help -d 'Display usage information' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -s d -l 'dry-run' -d 'Do not execute any commands with side-effects' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -s q -l quiet -d 'Do not print commands before execution' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -s v -l version -d 'Dsiplay the version' + +# Actions +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -a build -d 'Build the current project' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -a run -d 'Run the current project' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -a test -d 'Test the current project' +complete -c projectdo -n "not __fish_seen_subcommand_from $commands" \ + -a tool -d 'Invoke the tool corresponding to the current project' diff --git a/.config/fish/completions/replay.fish b/.config/fish/completions/replay.fish new file mode 100644 index 00000000..34b64773 --- /dev/null +++ b/.config/fish/completions/replay.fish @@ -0,0 +1,2 @@ +complete --command replay --exclusive --long version --description "Print version" +complete --command replay --exclusive --long help --description "Print help" diff --git a/.config/fish/completions/spark.fish b/.config/fish/completions/spark.fish new file mode 100644 index 00000000..d8daeedf --- /dev/null +++ b/.config/fish/completions/spark.fish @@ -0,0 +1,4 @@ +complete --command spark --exclusive --long min --description "Minimum range" +complete --command spark --exclusive --long max --description "Maximum range" +complete --command spark --exclusive --long version --description "Print version" +complete --command spark --exclusive --long help --description "Print this help message" diff --git a/.config/fish/completions/tag.fish b/.config/fish/completions/tag.fish new file mode 100644 index 00000000..7046d768 --- /dev/null +++ b/.config/fish/completions/tag.fish @@ -0,0 +1,31 @@ +# GitNow โ€” Speed up your Git workflow. ๐Ÿ  +# https://github.com/joseluisq/gitnow + +# Tag command + +__gitnow_load_git_functions + +complete -f -x -c tag \ + -d "List all tags in a lexicographic order and treating tag names as versions" + +complete -f -x -c tag -a '(__fish_git_tags)' + +complete -f -x -c tag \ + -s h -l help \ + -d "Show information about the options for this command" + +complete -f -x -c tag \ + -s l -l latest \ + -d "Show only the latest Semver release tag version (no suffixed ones or others)" + +complete -f -x -c tag \ + -s x -l major \ + -d "Tag auto-incrementing a major version number" + +complete -f -x -c tag \ + -s y -l minor \ + -d "Tag auto-incrementing a minor version number" + +complete -f -x -c tag \ + -s z -l patch \ + -d "Tag auto-incrementing a patch version number" diff --git a/.config/fish/conf.d/.gitnow b/.config/fish/conf.d/.gitnow new file mode 100644 index 00000000..748ca9d5 --- /dev/null +++ b/.config/fish/conf.d/.gitnow @@ -0,0 +1,40 @@ +[ options ] + +# Read text from system clipboard or from the standard input +# only when using Gitflow keybindings +clipboard = false + +[ keybindings ] + +# Alt + S +state = \es + +# Alt + E +stage = \ee + +# Ctrl + E +unstage = \ce + +# Alt + M +show = \em + +# Alt + C +commit-all = \ec + +# Alt + D +pull = \ed + +# Alt + P +push = \ep + +# Alt + U +upstream = \eu + +# Alt + L +logs = \el + +# Alt + F +feature = \ef + +# Alt + H +hotfix = \eh diff --git a/.config/fish/conf.d/__async_prompt.fish b/.config/fish/conf.d/__async_prompt.fish new file mode 100644 index 00000000..adc5dc47 --- /dev/null +++ b/.config/fish/conf.d/__async_prompt.fish @@ -0,0 +1,201 @@ +status is-interactive +or exit 0 + +set -g __async_prompt_tmpdir (command mktemp -d) + +# Setup after the user defined prompt functions are loaded. +function __async_prompt_setup_on_startup --on-event fish_prompt + functions -e (status current-function) + if test "$async_prompt_enable" = 0 + return 0 + end + + for func in (__async_prompt_config_functions) + function $func -V func + test -e $__async_prompt_tmpdir'/'$fish_pid'_'$func + and cat $__async_prompt_tmpdir'/'$fish_pid'_'$func + end + end +end + +function __async_prompt_keep_last_pipestatus + set -g __async_prompt_last_pipestatus $pipestatus +end + +not set -q async_prompt_on_variable +and set async_prompt_on_variable fish_bind_mode +function __async_prompt_fire --on-event fish_prompt (for var in $async_prompt_on_variable; printf '%s\n' --on-variable $var; end) + for func in (__async_prompt_config_functions) + set -l tmpfile $__async_prompt_tmpdir'/'$fish_pid'_'$func + + if functions -q $func'_loading_indicator' && test -e $tmpfile + read -zl last_prompt <$tmpfile + eval (string escape -- $func'_loading_indicator' "$last_prompt") >$tmpfile + end + + __async_prompt_config_inherit_variables | __async_prompt_spawn \ + $func' | read -z prompt + echo -n $prompt >'$tmpfile + end +end + +function __async_prompt_spawn -a cmd + set -l envs + begin + while read line + switch "$line" + case fish_bind_mode + echo fish_bind_mode $fish_bind_mode + case FISH_VERSION PWD _ history 'fish_*' hostname version status_generation + case status pipestatus + echo pipestatus $__async_prompt_last_pipestatus + case SHLVL + set envs $envs SHLVL=$SHLVL + case '*' + echo $line (string escape -- $$line) + end + end + end | read -lz vars + echo $vars | env $envs fish -c ' + function __async_prompt_signal + kill -s "'(__async_prompt_config_internal_signal)'" '$fish_pid' 2>/dev/null + end + while read -a line + test -z "$line" + and continue + + if test "$line[1]" = pipestatus + set -f _pipestatus $line[2..] + else + eval set "$line" + end + end + + function __async_prompt_set_status + return $argv + end + if set -q _pipestatus + switch (count $_pipestatus) + case 1 + __async_prompt_set_status $_pipestatus[1] + case 2 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] + case 3 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] + case 4 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] + case 5 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] \ + | __async_prompt_set_status $_pipestatus[5] + case 6 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] \ + | __async_prompt_set_status $_pipestatus[5] \ + | __async_prompt_set_status $_pipestatus[6] + case 7 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] \ + | __async_prompt_set_status $_pipestatus[5] \ + | __async_prompt_set_status $_pipestatus[6] \ + | __async_prompt_set_status $_pipestatus[7] + case 8 + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] \ + | __async_prompt_set_status $_pipestatus[5] \ + | __async_prompt_set_status $_pipestatus[6] \ + | __async_prompt_set_status $_pipestatus[7] \ + | __async_prompt_set_status $_pipestatus[8] + default + __async_prompt_set_status $_pipestatus[1] \ + | __async_prompt_set_status $_pipestatus[2] \ + | __async_prompt_set_status $_pipestatus[3] \ + | __async_prompt_set_status $_pipestatus[4] \ + | __async_prompt_set_status $_pipestatus[5] \ + | __async_prompt_set_status $_pipestatus[6] \ + | __async_prompt_set_status $_pipestatus[7] \ + | __async_prompt_set_status $_pipestatus[8] \ + | __async_prompt_set_status $_pipestatus[-1] + end + else + true + end + '$cmd' + __async_prompt_signal' & + if test (__async_prompt_config_disown) = 1 + disown + end +end + +function __async_prompt_config_inherit_variables + if set -q async_prompt_inherit_variables + if test "$async_prompt_inherit_variables" = all + set -ng + else + for item in $async_prompt_inherit_variables + echo $item + end + end + else + echo CMD_DURATION + echo fish_bind_mode + echo pipestatus + echo SHLVL + echo status + end +end + +function __async_prompt_config_functions + set -l funcs ( + if set -q async_prompt_functions + string join \n $async_prompt_functions + else + echo fish_prompt + echo fish_right_prompt + end + ) + for func in $funcs + functions -q "$func" + or continue + + echo $func + end +end + +function __async_prompt_config_internal_signal + if test -z "$async_prompt_signal_number" + echo SIGUSR1 + else + echo "$async_prompt_signal_number" + end +end + +function __async_prompt_config_disown + if test -z "$async_prompt_disown" + echo 1 + else + echo "$async_prompt_disown" + end +end + +function __async_prompt_repaint_prompt --on-signal (__async_prompt_config_internal_signal) + commandline -f repaint >/dev/null 2>/dev/null +end + +function __async_prompt_tmpdir_cleanup --on-event fish_exit + rm -rf "$__async_prompt_tmpdir" +end diff --git a/.config/fish/conf.d/autopair.fish b/.config/fish/conf.d/autopair.fish new file mode 100644 index 00000000..abb4bf3e --- /dev/null +++ b/.config/fish/conf.d/autopair.fish @@ -0,0 +1,39 @@ +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/.config/fish/conf.d/done.fish b/.config/fish/conf.d/done.fish new file mode 100644 index 00000000..3f9f0d3c --- /dev/null +++ b/.config/fish/conf.d/done.fish @@ -0,0 +1,334 @@ +# 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.19.3 + +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 "