Skip to content

Commit

Permalink
Merge pull request #30 from sasasin/fisher-update
Browse files Browse the repository at this point in the history
fisher 3.x to 4.x upgrade
  • Loading branch information
sasasin authored Sep 10, 2023
2 parents d22f02a + 2f76e00 commit f5254b3
Show file tree
Hide file tree
Showing 13 changed files with 243 additions and 402 deletions.
Empty file modified .config/fish/completions/asdf.fish
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion .config/fish/completions/fisher.fish

This file was deleted.

Empty file modified .config/fish/completions/ghq.fish
100755 → 100644
Empty file.
36 changes: 35 additions & 1 deletion .config/fish/completions/kubectl.fish
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ function __fish_kubectl
end
end

command kubectl $__fish_kubectl_timeout $context_args $argv
set -l kubeconfig_args

if set -l kubeconfig_args (__fish_kubectl_get_kubeconfig_flags | string split " ")
for c in $kubeconfig_args
set kubeconfig_args $kubeconfig_args $c
end
end

command kubectl $__fish_kubectl_timeout $context_args $kubeconfig_args $argv
end

function __fish_kubectl_get_commands
Expand Down Expand Up @@ -288,6 +296,32 @@ function __fish_kubectl_get_context_flags
return 1
end

function __fish_kubectl_get_kubeconfig_flags
set -l cmd (commandline -opc)
if [ (count $cmd) -eq 0 ]
return 1
end

set -l foundKubeconfig 0

for c in $cmd
test $foundKubeconfig -eq 1
set -l out "--kubeconfig" "$c"
and echo $out
and return 0

if string match -q -r -- "--kubeconfig=" "$c"
set -l out (string split -- "=" "$c" | string join " ")
and echo $out
and return 0
else if contains -- "$c" "--kubeconfig"
set foundKubeconfig 1
end
end

return 1
end

function __fish_kubectl_get_ns_flags
set -l cmd (commandline -opc)
if [ (count $cmd) -eq 0 ]
Expand Down
10 changes: 7 additions & 3 deletions .config/fish/conf.d/asdf.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
if test -n "$ASDF_DATA_DIR" -a -d "$ASDF_DATA_DIR"
source $ASDF_DATA_DIR/asdf.fish
end

if test -e ~/.asdf/asdf.fish
else if test -f ~/.asdf/asdf.fish
source ~/.asdf/asdf.fish
else if test -f /usr/local/opt/asdf/asdf.fish
source /usr/local/opt/asdf/asdf.fish
else if test -f /opt/homebrew/opt/asdf/asdf.fish
source /opt/homebrew/opt/asdf/asdf.fish
else if test -f /opt/homebrew/opt/asdf/libexec/asdf.fish
source /opt/homebrew/opt/asdf/libexec/asdf.fish
end
Empty file modified .config/fish/conf.d/ghq_key_bindings.fish
100755 → 100644
Empty file.
File renamed without changes.
7 changes: 7 additions & 0 deletions .config/fish/fish_variables
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3400
SETUVAR _fisher_decors_2F_fish_2D_ghq_files:\x7e/\x2econfig/fish/functions/__ghq_repository_search\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/ghq_key_bindings\x2efish\x1e\x7e/\x2econfig/fish/completions/ghq\x2efish
SETUVAR _fisher_evanlucas_2F_fish_2D_kubectl_2D_completions_files:\x7e/\x2econfig/fish/completions/kubectl\x2efish
SETUVAR _fisher_oh_2D_my_2D_fish_2F_plugin_2D_balias_files:\x7e/\x2econfig/fish/functions/balias\x2efish
SETUVAR _fisher_oh_2D_my_2D_fish_2F_plugin_2D_peco_files:\x7e/\x2econfig/fish/functions/peco_kill\x2efish\x1e\x7e/\x2econfig/fish/functions/peco_select_history\x2efish
SETUVAR _fisher_plugins:decors/fish\x2dghq\x1eoh\x2dmy\x2dfish/plugin\x2dpeco\x1eoh\x2dmy\x2dfish/plugin\x2dbalias\x1eevanlucas/fish\x2dkubectl\x2dcompletions\x1erstacruz/fish\x2dasdf
SETUVAR _fisher_rstacruz_2F_fish_2D_asdf_files:\x7e/\x2econfig/fish/conf\x2ed/asdf\x2efish\x1e\x7e/\x2econfig/fish/completions/asdf\x2efish
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7
Expand Down
Empty file modified .config/fish/functions/__ghq_repository_search.fish
100755 → 100644
Empty file.
Empty file modified .config/fish/functions/balias.fish
100755 → 100644
Empty file.
Loading

0 comments on commit f5254b3

Please sign in to comment.