From a92e04578dae6c079f3d3ca0c15e4c2e1e1a5bb3 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Fri, 18 Jul 2025 14:29:52 +0200 Subject: [PATCH] Remove Bash and Fish Shell --- README.md | 2 - bash/.bash_profile | 6 - bash/.bashrc | 192 ---------- bash/.bashrc.aliases | 49 --- fish/.config/fish/completions/argocd.fish | 235 ------------ fish/.config/fish/completions/delta.fish | 107 ------ fish/.config/fish/completions/exercism.fish | 54 --- fish/.config/fish/completions/fisher.fish | 7 - .../completions/fzf_configure_bindings.fish | 8 - fish/.config/fish/completions/glow.fish | 177 --------- fish/.config/fish/completions/go-task.fish | 38 -- fish/.config/fish/completions/helm.fish | 235 ------------ fish/.config/fish/completions/k9s.fish | 235 ------------ fish/.config/fish/completions/kind.fish | 176 --------- .../.config/fish/completions/kubebuilder.fish | 235 ------------ fish/.config/fish/completions/kubectl.fish | 249 ------------- fish/.config/fish/completions/minikube.fish | 249 ------------- fish/.config/fish/completions/oc.fish | 236 ------------ .../fish/completions/operator-sdk.fish | 235 ------------ fish/.config/fish/completions/poetry.fish | 257 -------------- fish/.config/fish/completions/ya.fish | 52 --- fish/.config/fish/completions/yazi.fish | 9 - fish/.config/fish/conf.d/done.fish | 335 ------------------ fish/.config/fish/conf.d/fzf.fish | 28 -- fish/.config/fish/conf.d/ghcup.fish | 9 - fish/.config/fish/conf.d/go.fish | 3 - fish/.config/fish/conf.d/homebrew.fish | 3 - fish/.config/fish/conf.d/mise.fish | 1 - fish/.config/fish/conf.d/rustup.fish | 1 - fish/.config/fish/conf.d/zoxide.fish | 1 - fish/.config/fish/config.fish | 178 ---------- fish/.config/fish/fish_plugins | 6 - fish/.config/fish/fish_variables | 55 --- fish/.config/fish/functions/__bass.py | 140 -------- .../_fzf_configure_bindings_help.fish | 43 --- .../fish/functions/_fzf_extract_var_info.fish | 15 - .../functions/_fzf_preview_changed_file.fish | 49 --- .../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 --- fish/.config/fish/functions/_fzf_wrapper.fish | 21 -- fish/.config/fish/functions/bass.fish | 29 -- fish/.config/fish/functions/fisher.fish | 240 ------------- .../functions/fzf_configure_bindings.fish | 46 --- .../fish/themes/Catppuccin Frappe.theme | 30 -- .../fish/themes/Catppuccin Latte.theme | 30 -- .../fish/themes/Catppuccin Macchiato.theme | 30 -- .../fish/themes/Catppuccin Mocha.theme | 30 -- bash/.bash_logout => zsh/.zlogout | 0 55 files changed, 4661 deletions(-) delete mode 100644 bash/.bash_profile delete mode 100644 bash/.bashrc delete mode 100644 bash/.bashrc.aliases delete mode 100644 fish/.config/fish/completions/argocd.fish delete mode 100644 fish/.config/fish/completions/delta.fish delete mode 100755 fish/.config/fish/completions/exercism.fish delete mode 100644 fish/.config/fish/completions/fisher.fish delete mode 100644 fish/.config/fish/completions/fzf_configure_bindings.fish delete mode 100644 fish/.config/fish/completions/glow.fish delete mode 100644 fish/.config/fish/completions/go-task.fish delete mode 100644 fish/.config/fish/completions/helm.fish delete mode 100644 fish/.config/fish/completions/k9s.fish delete mode 100644 fish/.config/fish/completions/kind.fish delete mode 100644 fish/.config/fish/completions/kubebuilder.fish delete mode 100644 fish/.config/fish/completions/kubectl.fish delete mode 100644 fish/.config/fish/completions/minikube.fish delete mode 100644 fish/.config/fish/completions/oc.fish delete mode 100644 fish/.config/fish/completions/operator-sdk.fish delete mode 100644 fish/.config/fish/completions/poetry.fish delete mode 100644 fish/.config/fish/completions/ya.fish delete mode 100644 fish/.config/fish/completions/yazi.fish delete mode 100755 fish/.config/fish/conf.d/done.fish delete mode 100644 fish/.config/fish/conf.d/fzf.fish delete mode 100644 fish/.config/fish/conf.d/ghcup.fish delete mode 100644 fish/.config/fish/conf.d/go.fish delete mode 100644 fish/.config/fish/conf.d/homebrew.fish delete mode 100644 fish/.config/fish/conf.d/mise.fish delete mode 100755 fish/.config/fish/conf.d/rustup.fish delete mode 100644 fish/.config/fish/conf.d/zoxide.fish delete mode 100755 fish/.config/fish/config.fish delete mode 100755 fish/.config/fish/fish_plugins delete mode 100755 fish/.config/fish/fish_variables delete mode 100644 fish/.config/fish/functions/__bass.py delete mode 100644 fish/.config/fish/functions/_fzf_configure_bindings_help.fish delete mode 100644 fish/.config/fish/functions/_fzf_extract_var_info.fish delete mode 100644 fish/.config/fish/functions/_fzf_preview_changed_file.fish delete mode 100644 fish/.config/fish/functions/_fzf_preview_file.fish delete mode 100644 fish/.config/fish/functions/_fzf_report_diff_type.fish delete mode 100644 fish/.config/fish/functions/_fzf_report_file_type.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_directory.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_git_log.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_git_status.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_history.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_processes.fish delete mode 100644 fish/.config/fish/functions/_fzf_search_variables.fish delete mode 100644 fish/.config/fish/functions/_fzf_wrapper.fish delete mode 100644 fish/.config/fish/functions/bass.fish delete mode 100644 fish/.config/fish/functions/fisher.fish delete mode 100644 fish/.config/fish/functions/fzf_configure_bindings.fish delete mode 100644 fish/.config/fish/themes/Catppuccin Frappe.theme delete mode 100644 fish/.config/fish/themes/Catppuccin Latte.theme delete mode 100644 fish/.config/fish/themes/Catppuccin Macchiato.theme delete mode 100644 fish/.config/fish/themes/Catppuccin Mocha.theme rename bash/.bash_logout => zsh/.zlogout (100%) diff --git a/README.md b/README.md index b141e51..99545f2 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,6 @@ This repository contains my configuration files for the following tools: - **Shells & Prompt** - `zsh` + `starship` - - `bash` - - `fish` - **Terminal Emulator & Multiplexer** - `foot` - `kitty` diff --git a/bash/.bash_profile b/bash/.bash_profile deleted file mode 100644 index 30d4174..0000000 --- a/bash/.bash_profile +++ /dev/null @@ -1,6 +0,0 @@ -# -# ~/.bash_profile -# - -[[ -f ~/.bashrc ]] && . ~/.bashrc -[[ -f ~/.profile ]] && . ~/.profile diff --git a/bash/.bashrc b/bash/.bashrc deleted file mode 100644 index bd04788..0000000 --- a/bash/.bashrc +++ /dev/null @@ -1,192 +0,0 @@ -# -# ~/.bashrc -# - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -shopt -s autocd -shopt -s checkwinsize -shopt -s cdspell -shopt -s cmdhist -shopt -s histappend -shopt -s hostcomplete - -# Make colorcoding available for everyone -Black='\e[0;30m' # Black -Red='\e[0;31m' # Red -Green='\e[0;32m' # Green -Yellow='\e[0;33m' # Yellow -Blue='\e[0;34m' # Blue -Purple='\e[0;35m' # Purple -Cyan='\e[0;36m' # Cyan -White='\e[0;37m' # White - -# Bold -BBlack='\e[1;30m' # Black -BRed='\e[1;31m' # Red -BGreen='\e[1;32m' # Green -BYellow='\e[1;33m' # Yellow -BBlue='\e[1;34m' # Blue -BPurple='\e[1;35m' # Purple -BCyan='\e[1;36m' # Cyan -BWhite='\e[1;37m' # White - -# Background -On_Black='\e[40m' # Black -On_Red='\e[41m' # Red -On_Green='\e[42m' # Green -On_Yellow='\e[43m' # Yellow -On_Blue='\e[44m' # Blue -On_Purple='\e[45m' # Purple -On_Cyan='\e[46m' # Cyan -On_White='\e[47m' # White - -NC="\e[m" # Color Reset - -# new alert text -ALERT=${BWhite}${On_Red} # Bold White on red background - -# Creates an archive (*.tar.gz) from given directory. -function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } - -# Create a ZIP archive of a file or folder. -function makezip() { zip -r "${1%%/}.zip" "$1" ; } - -function extract { - if [ -z "$1" ]; then - # display usage if no parameters given - echo "Usage: extract ." - else - if [ -f $1 ] ; then - # NAME=${1%.*} - # mkdir $NAME && cd $NAME - case $1 in - *.tar.bz2) tar xvjf ../$1 ;; - *.tar.gz) tar xvzf ../$1 ;; - *.tar.xz) tar xvJf ../$1 ;; - *.lzma) unlzma ../$1 ;; - *.bz2) bunzip2 ../$1 ;; - *.rar) unrar x -ad ../$1 ;; - *.gz) gunzip ../$1 ;; - *.tar) tar xvf ../$1 ;; - *.tbz2) tar xvjf ../$1 ;; - *.tgz) tar xvzf ../$1 ;; - *.zip) unzip ../$1 ;; - *.Z) uncompress ../$1 ;; - *.7z) 7z x ../$1 ;; - *.xz) unxz ../$1 ;; - *.exe) cabextract ../$1 ;; - *) echo "extract: '$1' - unknown archive method" ;; - esac - else - echo "$1 - file does not exist" - fi - fi -} - -# jump directorys upwards until it hits a directory with multiple folders -function up(){ - local d="" - limit=$1 - for ((i=1 ; i <= limit ; i++)) - do - d=$d/.. - done - d=$(echo $d | sed 's/^\///') - if [ -z "$d" ]; then - d=.. - fi - cd "$d" || exit -} - -# create an directory and directly cd into it -function mcd() { - mkdir -p "$1" - cd "$1" || exit -} - -function parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' -} - -function my_ip() { - INTERFACE=$(ip addr | awk '/state UP/ {print $2}' | sed 's/.$//') - echo "$(/sbin/ifconfig $INTERFACE | awk "/inet/ {print $2} " | sed -e s/addr://)" -} - -function welcome() { - #------------------------------------------ - #------WELCOME MESSAGE--------------------- - # customize this first message with a message of your choice. - # this will display the username, date, time, a calendar, the amount of users, and the up time. - clear - # Gotta love ASCII art with figlet - #figlet "Welcome, " $USER; - toilet -f starwars -t "Welcome, " $USER; - #echo -e ""; cal ; - fastfetch 2> /dev/null - echo "" - echo -ne "Today is "; date - echo -e "" - echo -ne "Up time:";uptime | awk /'up/' - echo -en "Local IP Address : "; my_ip | awk '{print $2}' - echo ""; -} - -[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases" - -# export QT_STYLE_OVERRIDE=gtk -# export QT_SELECT=qt5 - -if [[ $LANG = '' ]]; then - export LANG=it_IT.UTF-8 -fi - -if [ -n "$SSH_CLIENT" ]; then - ssh_placeholder=' {SSH::SESSION}' -fi - -if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then - # To only show the git prompt in or under a repository directory - GIT_PROMPT_ONLY_IN_REPO=0 - # To use upstream's default theme - GIT_PROMPT_THEME=Custom - source "$HOME/.bash-git-prompt/gitprompt.sh" -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -[ -e "/etc/DIR_COLORS" ] && DIR_COLORS="/etc/DIR_COLORS" -[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors" -[ -e "$DIR_COLORS" ] || DIR_COLORS="" - -[ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env" - -if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then - # Initialize Homebrew - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -fi - -if command -v oh-my-posh > /dev/null 2>&1; then - eval "$(oh-my-posh init bash --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")" -fi - -if command -v zoxide > /dev/null 2>&1; then - # Initialize Zoxide - eval "$(zoxide init bash)" -fi - -if command -v mise > /dev/null 2>&1; then - # Activate Mise JDX - eval "$(mise activate bash)" -fi diff --git a/bash/.bashrc.aliases b/bash/.bashrc.aliases deleted file mode 100644 index a28339d..0000000 --- a/bash/.bashrc.aliases +++ /dev/null @@ -1,49 +0,0 @@ -# -# ~/.bashrc.aliases -# - -# Alias di cambio directory -alias ..="cd .." -alias ...="cd ../.." -alias .3="cd ../../.." -alias .4="cd ../../../.." -alias .5="cd ../../../../.." -alias cd..="cd .." -alias home="cd ~" - -# Alias del comando ls -alias l="ls -CF --color=always" -alias ls="ls --color=always" -alias lla="ls -lisah" -alias ll="ls -lh" -alias la="ls -CFa" -alias lsl="ls -lhFA | less" - -# Output colorato comandi vari -alias grep='grep --color=auto' -alias gcc='colorgcc' -alias diff='colordiff' - -# Alias vari -alias path='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths -alias mkdir="mkdir -pv" -alias journalctl='sudo journalctl' -alias failed='sudo systemctl --failed' -alias se='ls /usr/bin | grep' -alias df='df -h' -alias du='du -h' -alias please='sudo $(fc -ln -1)' -alias userlist="cut -d: -f1 /etc/passwd | sort" -alias fhere="find . -name " -alias free="free -mth" -alias ps="ps auxf" -alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" -alias wget="wget -c" -alias histg="history | grep" -alias myip="curl http://ipecho.net/plain; echo" -alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f" -alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn' -alias vpn-add='nmcli connection import type openvpn file' -alias pbcopy='xsel --clipboard --input' -alias pbpaste='xsel --clipboard --output' -alias stow='stow --dotfiles -d ~/.dotfiles ' diff --git a/fish/.config/fish/completions/argocd.fish b/fish/.config/fish/completions/argocd.fish deleted file mode 100644 index 4527d05..0000000 --- a/fish/.config/fish/completions/argocd.fish +++ /dev/null @@ -1,235 +0,0 @@ -# fish completion for argocd -*- shell-script -*- - -function __argocd_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __argocd_perform_completion - __argocd_debug "Starting __argocd_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __argocd_debug "args: $args" - __argocd_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "ARGOCD_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __argocd_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __argocd_debug "Comps: $comps" - __argocd_debug "DirectiveLine: $directiveLine" - __argocd_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __argocd_perform_completion, by caching the result behind $__argocd_perform_completion_once_result -function __argocd_perform_completion_once - __argocd_debug "Starting __argocd_perform_completion_once" - - if test -n "$__argocd_perform_completion_once_result" - __argocd_debug "Seems like a valid result already exists, skipping __argocd_perform_completion" - return 0 - end - - set --global __argocd_perform_completion_once_result (__argocd_perform_completion) - if test -z "$__argocd_perform_completion_once_result" - __argocd_debug "No completions, probably due to a failure" - return 1 - end - - __argocd_debug "Performed completions and set __argocd_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__argocd_perform_completion_once_result variable after completions are run -function __argocd_clear_perform_completion_once_result - __argocd_debug "" - __argocd_debug "========= clearing previously set __argocd_perform_completion_once_result variable ==========" - set --erase __argocd_perform_completion_once_result - __argocd_debug "Succesfully erased the variable __argocd_perform_completion_once_result" -end - -function __argocd_requires_order_preservation - __argocd_debug "" - __argocd_debug "========= checking if order preservation is required ==========" - - __argocd_perform_completion_once - if test -z "$__argocd_perform_completion_once_result" - __argocd_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__argocd_perform_completion_once_result[-1]) - __argocd_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __argocd_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __argocd_debug "This does require order preservation" - return 0 - end - - __argocd_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __argocd_comp_results -# - Return false if file completion should be performed -function __argocd_prepare_completions - __argocd_debug "" - __argocd_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __argocd_comp_results - - __argocd_perform_completion_once - __argocd_debug "Completion results: $__argocd_perform_completion_once_result" - - if test -z "$__argocd_perform_completion_once_result" - __argocd_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__argocd_perform_completion_once_result[-1]) - set --global __argocd_comp_results $__argocd_perform_completion_once_result[1..-2] - - __argocd_debug "Completions are: $__argocd_comp_results" - __argocd_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __argocd_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __argocd_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __argocd_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __argocd_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__argocd_comp_results) - set --global __argocd_comp_results $completions - __argocd_debug "Filtered completions are: $__argocd_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__argocd_comp_results) - __argocd_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__argocd_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __argocd_debug "Adding second completion to perform nospace directive" - set --global __argocd_comp_results $split[1] $split[1]. - __argocd_debug "Completions are now: $__argocd_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __argocd_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "argocd" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "argocd " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c argocd -e - -# this will get called after the two calls below and clear the $__argocd_perform_completion_once_result global -complete -c argocd -n '__argocd_clear_perform_completion_once_result' -# The call to __argocd_prepare_completions will setup __argocd_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c argocd -n 'not __argocd_requires_order_preservation && __argocd_prepare_completions' -f -a '$__argocd_comp_results' -# otherwise we use the -k flag -complete -k -c argocd -n '__argocd_requires_order_preservation && __argocd_prepare_completions' -f -a '$__argocd_comp_results' diff --git a/fish/.config/fish/completions/delta.fish b/fish/.config/fish/completions/delta.fish deleted file mode 100644 index 93f7d2c..0000000 --- a/fish/.config/fish/completions/delta.fish +++ /dev/null @@ -1,107 +0,0 @@ -complete -c delta -l blame-code-style -d 'Style string for the code section of a git blame line' -r -complete -c delta -l blame-format -d 'Format string for git blame commit metadata' -r -complete -c delta -l blame-palette -d 'Background colors used for git blame lines (space-separated string)' -r -complete -c delta -l blame-separator-format -d 'Separator between the blame format and the code section of a git blame line' -r -complete -c delta -l blame-separator-style -d 'Style string for the blame-separator-format' -r -complete -c delta -l blame-timestamp-format -d 'Format of `git blame` timestamp in raw git output received by delta' -r -complete -c delta -l blame-timestamp-output-format -d 'Format string for git blame timestamp output' -r -complete -c delta -l config -d 'Load the config file at PATH instead of ~/.gitconfig' -r -F -complete -c delta -l commit-decoration-style -d 'Style string for the commit hash decoration' -r -complete -c delta -l commit-regex -d 'Regular expression used to identify the commit line when parsing git output' -r -complete -c delta -l commit-style -d 'Style string for the commit hash line' -r -complete -c delta -l default-language -d 'Default language used for syntax highlighting' -r -complete -c delta -l detect-dark-light -d 'Detect whether or not the terminal is dark or light by querying for its colors' -r -f -a "{auto 'Only query the terminal for its colors if the output is not redirected',always 'Always query the terminal for its colors',never 'Never query the terminal for its colors'}" -complete -c delta -l diff-stat-align-width -d 'Width allocated for file paths in a diff stat section' -r -complete -c delta -l features -d 'Names of delta features to activate (space-separated)' -r -complete -c delta -l file-added-label -d 'Text to display before an added file path' -r -complete -c delta -l file-copied-label -d 'Text to display before a copied file path' -r -complete -c delta -l file-decoration-style -d 'Style string for the file decoration' -r -complete -c delta -l file-modified-label -d 'Text to display before a modified file path' -r -complete -c delta -l file-removed-label -d 'Text to display before a removed file path' -r -complete -c delta -l file-renamed-label -d 'Text to display before a renamed file path' -r -complete -c delta -l file-style -d 'Style string for the file section' -r -complete -c delta -l file-transformation -d 'Sed-style command transforming file paths for display' -r -complete -c delta -l generate-completion -d 'Print completion file for the given shell' -r -f -a "{bash '',elvish '',fish '',powershell '',zsh ''}" -complete -c delta -l grep-context-line-style -d 'Style string for non-matching lines of grep output' -r -complete -c delta -l grep-file-style -d 'Style string for file paths in grep output' -r -complete -c delta -l grep-header-decoration-style -d 'Style string for the header decoration in grep output' -r -complete -c delta -l grep-header-file-style -d 'Style string for the file path part of the header in grep output' -r -complete -c delta -l grep-line-number-style -d 'Style string for line numbers in grep output' -r -complete -c delta -l grep-output-type -d 'Grep output format. Possible values: "ripgrep" - file name printed once, followed by matching lines within that file, each preceded by a line number. "classic" - file name:line number, followed by matching line. Default is "ripgrep" if `rg --json` format is detected, otherwise "classic"' -r -f -a "{ripgrep '',classic ''}" -complete -c delta -l grep-match-line-style -d 'Style string for matching lines of grep output' -r -complete -c delta -l grep-match-word-style -d 'Style string for the matching substrings within a matching line of grep output' -r -complete -c delta -l grep-separator-symbol -d 'Separator symbol printed after the file path and line number in grep output' -r -complete -c delta -l hunk-header-decoration-style -d 'Style string for the hunk-header decoration' -r -complete -c delta -l hunk-header-file-style -d 'Style string for the file path part of the hunk-header' -r -complete -c delta -l hunk-header-line-number-style -d 'Style string for the line number part of the hunk-header' -r -complete -c delta -l hunk-header-style -d 'Style string for the hunk-header' -r -complete -c delta -l hunk-label -d 'Text to display before a hunk header' -r -complete -c delta -l hyperlinks-commit-link-format -d 'Format string for commit hyperlinks (requires --hyperlinks)' -r -complete -c delta -l hyperlinks-file-link-format -d 'Format string for file hyperlinks (requires --hyperlinks)' -r -complete -c delta -l inline-hint-style -d 'Style string for short inline hint text' -r -complete -c delta -l inspect-raw-lines -d 'Kill-switch for --color-moved support' -r -f -a "{true '',false ''}" -complete -c delta -l line-buffer-size -d 'Size of internal line buffer' -r -complete -c delta -l line-fill-method -d 'Line-fill method in side-by-side mode' -r -f -a "{ansi '',spaces ''}" -complete -c delta -l line-numbers-left-format -d 'Format string for the left column of line numbers' -r -complete -c delta -l line-numbers-left-style -d 'Style string for the left column of line numbers' -r -complete -c delta -l line-numbers-minus-style -d 'Style string for line numbers in the old (minus) version of the file' -r -complete -c delta -l line-numbers-plus-style -d 'Style string for line numbers in the new (plus) version of the file' -r -complete -c delta -l line-numbers-right-format -d 'Format string for the right column of line numbers' -r -complete -c delta -l line-numbers-right-style -d 'Style string for the right column of line numbers' -r -complete -c delta -l line-numbers-zero-style -d 'Style string for line numbers in unchanged (zero) lines' -r -complete -c delta -l map-styles -d 'Map styles encountered in raw input to desired output styles' -r -complete -c delta -l max-line-distance -d 'Maximum line pair distance parameter in within-line diff algorithm' -r -complete -c delta -l max-line-length -d 'Truncate lines longer than this' -r -complete -c delta -l merge-conflict-begin-symbol -d 'String marking the beginning of a merge conflict region' -r -complete -c delta -l merge-conflict-end-symbol -d 'String marking the end of a merge conflict region' -r -complete -c delta -l merge-conflict-ours-diff-header-decoration-style -d 'Style string for the decoration of the header above the \'ours\' merge conflict diff' -r -complete -c delta -l merge-conflict-ours-diff-header-style -d 'Style string for the header above the \'ours\' branch merge conflict diff' -r -complete -c delta -l merge-conflict-theirs-diff-header-decoration-style -d 'Style string for the decoration of the header above the \'theirs\' merge conflict diff' -r -complete -c delta -l merge-conflict-theirs-diff-header-style -d 'Style string for the header above the \'theirs\' branch merge conflict diff' -r -complete -c delta -l minus-empty-line-marker-style -d 'Style string for removed empty line marker' -r -complete -c delta -l minus-emph-style -d 'Style string for emphasized sections of removed lines' -r -complete -c delta -l minus-non-emph-style -d 'Style string for non-emphasized sections of removed lines that have an emphasized section' -r -complete -c delta -l minus-style -d 'Style string for removed lines' -r -complete -c delta -l navigate-regex -d 'Regular expression defining navigation stop points' -r -complete -c delta -l pager -d 'Which pager to use' -r -complete -c delta -l paging -d 'Whether to use a pager when displaying output' -r -f -a "{auto '',always '',never ''}" -complete -c delta -l plus-emph-style -d 'Style string for emphasized sections of added lines' -r -complete -c delta -l plus-empty-line-marker-style -d 'Style string for added empty line marker' -r -complete -c delta -l plus-non-emph-style -d 'Style string for non-emphasized sections of added lines that have an emphasized section' -r -complete -c delta -l plus-style -d 'Style string for added lines' -r -complete -c delta -l right-arrow -d 'Text to display with a changed file path' -r -complete -c delta -l syntax-theme -d 'The syntax-highlighting theme to use' -r -complete -c delta -l tabs -d 'The number of spaces to replace tab characters with' -r -complete -c delta -l true-color -d 'Whether to emit 24-bit ("true color") RGB color codes' -r -f -a "{auto '',always '',never ''}" -complete -c delta -l whitespace-error-style -d 'Style string for whitespace errors' -r -complete -c delta -s w -l width -d 'The width of underline/overline decorations' -r -complete -c delta -l word-diff-regex -d 'Regular expression defining a \'word\' in within-line diff algorithm' -r -complete -c delta -l wrap-left-symbol -d 'End-of-line wrapped content symbol (left-aligned)' -r -complete -c delta -l wrap-max-lines -d 'How often a line should be wrapped if it does not fit' -r -complete -c delta -l wrap-right-percent -d 'Threshold for right-aligning wrapped content' -r -complete -c delta -l wrap-right-prefix-symbol -d 'Pre-wrapped content symbol (right-aligned)' -r -complete -c delta -l wrap-right-symbol -d 'End-of-line wrapped content symbol (right-aligned)' -r -complete -c delta -l zero-style -d 'Style string for unchanged lines' -r -complete -c delta -l 24-bit-color -d 'Deprecated: use --true-color' -r -f -a "{auto '',always '',never ''}" -complete -c delta -l color-only -d 'Do not alter the input structurally in any way' -complete -c delta -l dark -d 'Use default colors appropriate for a dark terminal background' -complete -c delta -l diff-highlight -d 'Emulate diff-highlight' -complete -c delta -l diff-so-fancy -d 'Emulate diff-so-fancy' -complete -c delta -l hyperlinks -d 'Render commit hashes, file names, and line numbers as hyperlinks' -complete -c delta -l keep-plus-minus-markers -d 'Prefix added/removed lines with a +/- character, as git does' -complete -c delta -l light -d 'Use default colors appropriate for a light terminal background' -complete -c delta -s n -l line-numbers -d 'Display line numbers next to the diff' -complete -c delta -l list-languages -d 'List supported languages and associated file extensions' -complete -c delta -l list-syntax-themes -d 'List available syntax-highlighting color themes' -complete -c delta -l navigate -d 'Activate diff navigation' -complete -c delta -l no-gitconfig -d 'Do not read any settings from git config' -complete -c delta -l parse-ansi -d 'Display ANSI color escape sequences in human-readable form' -complete -c delta -l raw -d 'Do not alter the input in any way' -complete -c delta -l relative-paths -d 'Output all file paths relative to the current directory' -complete -c delta -l show-colors -d 'Show available named colors' -complete -c delta -l show-config -d 'Display the active values for all Delta options' -complete -c delta -l show-syntax-themes -d 'Show example diff for available syntax-highlighting themes' -complete -c delta -l show-themes -d 'Show example diff for available delta themes' -complete -c delta -s s -l side-by-side -d 'Display diffs in side-by-side layout' -complete -c delta -s h -l help -d 'Print help (see more with \'--help\')' -complete -c delta -s V -l version -d 'Print version' diff --git a/fish/.config/fish/completions/exercism.fish b/fish/.config/fish/completions/exercism.fish deleted file mode 100755 index dc20fdc..0000000 --- a/fish/.config/fish/completions/exercism.fish +++ /dev/null @@ -1,54 +0,0 @@ -# Configure -complete -f -c exercism -n "__fish_use_subcommand" -a "configure" -d "Writes config values to a JSON file." -complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s t -l token -d "Set token" -complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s w -l workspace -d "Set workspace" -complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s a -l api -d "set API base url" -complete -f -c exercism -n "__fish_seen_subcommand_from configure" -s s -l show -d "show settings" - -# Download -complete -f -c exercism -n "__fish_use_subcommand" -a "download" -d "Downloads and saves a specified submission into the local system" -complete -f -c exercism -n "__fish_seen_subcommand_from download" -s e -l exercise -d "the exercise slug" -complete -f -c exercism -n "__fish_seen_subcommand_from download" -s h -l help -d "help for download" -complete -f -c exercism -n "__fish_seen_subcommand_from download" -s T -l team -d "the team slug" -complete -f -c exercism -n "__fish_seen_subcommand_from download" -s t -l track -d "the track ID" -complete -f -c exercism -n "__fish_seen_subcommand_from download" -s u -l uuid -d "the solution UUID" - -# Help -complete -f -c exercism -n "__fish_use_subcommand" -a "help" -d "Shows a list of commands or help for one command" -complete -f -c exercism -n "__fish_seen_subcommand_from help" -a "configure download help open submit troubleshoot upgrade version workspace" - -# Open -complete -f -c exercism -n "__fish_use_subcommand" -a "open" -d "Opens a browser to exercism.io for the specified submission." -complete -f -c exercism -n "__fish_seen_subcommand_from open" -s h -l help -d "help for open" - -# Submit -complete -f -c exercism -n "__fish_use_subcommand" -a "submit" -d "Submits a new iteration to a problem on exercism.io." -complete -f -c exercism -n "__fish_seen_subcommand_from submit" -s h -l help -d "help for submit" - -# Troubleshoot -complete -f -c exercism -n "__fish_use_subcommand" -a "troubleshoot" -d "Outputs useful debug information." -complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s f -l full-api-key -d "display full API key (censored by default)" -complete -f -c exercism -n "__fish_seen_subcommand_from troubleshoot" -s h -l help -d "help for troubleshoot" - -# Upgrade -complete -f -c exercism -n "__fish_use_subcommand" -a "upgrade" -d "Upgrades to the latest available version." -complete -f -c exercism -n "__fish_seen_subcommand_from help" -s h -l help -d "help for help" - -# Version -complete -f -c exercism -n "__fish_use_subcommand" -a "version" -d "Outputs version information." -complete -f -c exercism -n "__fish_seen_subcommand_from version" -s l -l latest -d "check latest available version" -complete -f -c exercism -n "__fish_seen_subcommand_from version" -s h -l help -d "help for version" - -# Workspace -complete -f -c exercism -n "__fish_use_subcommand" -a "workspace" -d "Outputs the root directory for Exercism exercises." -complete -f -c exercism -n "__fish_seen_subcommand_from workspace" -s h -l help -d "help for workspace" - -# Options -complete -f -c exercism -s h -l help -d "show help" -complete -f -c exercism -l timeout -a "10" -d "10 seconds" -complete -f -c exercism -l timeout -a "30" -d "30 seconds" -complete -f -c exercism -l timeout -a "60" -d "1 minute" -complete -f -c exercism -l timeout -a "300" -d "5 minutes" -complete -f -c exercism -l timeout -a "600" -d "10 minutes" -complete -f -c exercism -l timeout -a "" -d "override default HTTP timeout" -complete -f -c exercism -s v -l verbose -d "turn on verbose logging" diff --git a/fish/.config/fish/completions/fisher.fish b/fish/.config/fish/completions/fisher.fish deleted file mode 100644 index 6d23ce4..0000000 --- a/fish/.config/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/fish/.config/fish/completions/fzf_configure_bindings.fish b/fish/.config/fish/completions/fzf_configure_bindings.fish deleted file mode 100644 index b38ef92..0000000 --- a/fish/.config/fish/completions/fzf_configure_bindings.fish +++ /dev/null @@ -1,8 +0,0 @@ -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/fish/.config/fish/completions/glow.fish b/fish/.config/fish/completions/glow.fish deleted file mode 100644 index 67ebaaf..0000000 --- a/fish/.config/fish/completions/glow.fish +++ /dev/null @@ -1,177 +0,0 @@ -# fish completion for glow -*- shell-script -*- - -function __glow_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __glow_perform_completion - __glow_debug "Starting __glow_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __glow_debug "args: $args" - __glow_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "GLOW_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __glow_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __glow_debug "Comps: $comps" - __glow_debug "DirectiveLine: $directiveLine" - __glow_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# This function does two things: -# - Obtain the completions and store them in the global __glow_comp_results -# - Return false if file completion should be performed -function __glow_prepare_completions - __glow_debug "" - __glow_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __glow_comp_results - - set -l results (__glow_perform_completion) - __glow_debug "Completion results: $results" - - if test -z "$results" - __glow_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $results[-1]) - set --global __glow_comp_results $results[1..-2] - - __glow_debug "Completions are: $__glow_comp_results" - __glow_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __glow_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __glow_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __glow_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __glow_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__glow_comp_results) - set --global __glow_comp_results $completions - __glow_debug "Filtered completions are: $__glow_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__glow_comp_results) - __glow_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__glow_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __glow_debug "Adding second completion to perform nospace directive" - set --global __glow_comp_results $split[1] $split[1]. - __glow_debug "Completions are now: $__glow_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __glow_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "glow" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "glow " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c glow -e - -# The call to __glow_prepare_completions will setup __glow_comp_results -# which provides the program's completion choices. -complete -c glow -n '__glow_prepare_completions' -f -a '$__glow_comp_results' - diff --git a/fish/.config/fish/completions/go-task.fish b/fish/.config/fish/completions/go-task.fish deleted file mode 100644 index 92584ef..0000000 --- a/fish/.config/fish/completions/go-task.fish +++ /dev/null @@ -1,38 +0,0 @@ -set GO_TASK_PROGNAME task - -function __task_get_tasks --description "Prints all available tasks with their description" - # Read the list of tasks (and potential errors) - $GO_TASK_PROGNAME --list-all 2>&1 | read -lz rawOutput - - # Return on non-zero exit code (for cases when there is no Taskfile found or etc.) - if test $status -ne 0 - return - end - - # Grab names and descriptions (if any) of the tasks - set -l output (echo $rawOutput | sed -e '1d; s/\* \(.*\):\s*\(.*\)\s*(\(aliases.*\))/\1\t\2\t\3/' -e 's/\* \(.*\):\s*\(.*\)/\1\t\2/'| string split0) - if test $output - echo $output - end -end - -complete -c $GO_TASK_PROGNAME -d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was -specified.' -xa "(__task_get_tasks)" - -complete -c $GO_TASK_PROGNAME -s c -l color -d 'colored output (default true)' -complete -c $GO_TASK_PROGNAME -s d -l dir -d 'sets directory of execution' -complete -c $GO_TASK_PROGNAME -l dry -d 'compiles and prints tasks in the order that they would be run, without executing them' -complete -c $GO_TASK_PROGNAME -s f -l force -d 'forces execution even when the task is up-to-date' -complete -c $GO_TASK_PROGNAME -s h -l help -d 'shows Task usage' -complete -c $GO_TASK_PROGNAME -s i -l init -d 'creates a new Taskfile.yml in the current folder' -complete -c $GO_TASK_PROGNAME -s l -l list -d 'lists tasks with description of current Taskfile' -complete -c $GO_TASK_PROGNAME -s o -l output -d 'sets output style: [interleaved|group|prefixed]' -xa "interleaved group prefixed" -complete -c $GO_TASK_PROGNAME -s p -l parallel -d 'executes tasks provided on command line in parallel' -complete -c $GO_TASK_PROGNAME -s s -l silent -d 'disables echoing' -complete -c $GO_TASK_PROGNAME -l status -d 'exits with non-zero exit code if any of the given tasks is not up-to-date' -complete -c $GO_TASK_PROGNAME -l summary -d 'show summary about a task' -complete -c $GO_TASK_PROGNAME -s t -l taskfile -d 'choose which Taskfile to run. Defaults to "Taskfile.yml"' -complete -c $GO_TASK_PROGNAME -s v -l verbose -d 'enables verbose mode' -complete -c $GO_TASK_PROGNAME -l version -d 'show Task version' -complete -c $GO_TASK_PROGNAME -s w -l watch -d 'enables watch of the given task' - diff --git a/fish/.config/fish/completions/helm.fish b/fish/.config/fish/completions/helm.fish deleted file mode 100644 index 69aed4f..0000000 --- a/fish/.config/fish/completions/helm.fish +++ /dev/null @@ -1,235 +0,0 @@ -# fish completion for helm -*- shell-script -*- - -function __helm_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __helm_perform_completion - __helm_debug "Starting __helm_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __helm_debug "args: $args" - __helm_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "HELM_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __helm_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __helm_debug "Comps: $comps" - __helm_debug "DirectiveLine: $directiveLine" - __helm_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __helm_perform_completion, by caching the result behind $__helm_perform_completion_once_result -function __helm_perform_completion_once - __helm_debug "Starting __helm_perform_completion_once" - - if test -n "$__helm_perform_completion_once_result" - __helm_debug "Seems like a valid result already exists, skipping __helm_perform_completion" - return 0 - end - - set --global __helm_perform_completion_once_result (__helm_perform_completion) - if test -z "$__helm_perform_completion_once_result" - __helm_debug "No completions, probably due to a failure" - return 1 - end - - __helm_debug "Performed completions and set __helm_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__helm_perform_completion_once_result variable after completions are run -function __helm_clear_perform_completion_once_result - __helm_debug "" - __helm_debug "========= clearing previously set __helm_perform_completion_once_result variable ==========" - set --erase __helm_perform_completion_once_result - __helm_debug "Successfully erased the variable __helm_perform_completion_once_result" -end - -function __helm_requires_order_preservation - __helm_debug "" - __helm_debug "========= checking if order preservation is required ==========" - - __helm_perform_completion_once - if test -z "$__helm_perform_completion_once_result" - __helm_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__helm_perform_completion_once_result[-1]) - __helm_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __helm_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __helm_debug "This does require order preservation" - return 0 - end - - __helm_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __helm_comp_results -# - Return false if file completion should be performed -function __helm_prepare_completions - __helm_debug "" - __helm_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __helm_comp_results - - __helm_perform_completion_once - __helm_debug "Completion results: $__helm_perform_completion_once_result" - - if test -z "$__helm_perform_completion_once_result" - __helm_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__helm_perform_completion_once_result[-1]) - set --global __helm_comp_results $__helm_perform_completion_once_result[1..-2] - - __helm_debug "Completions are: $__helm_comp_results" - __helm_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __helm_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __helm_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __helm_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __helm_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__helm_comp_results) - set --global __helm_comp_results $completions - __helm_debug "Filtered completions are: $__helm_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__helm_comp_results) - __helm_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__helm_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __helm_debug "Adding second completion to perform nospace directive" - set --global __helm_comp_results $split[1] $split[1]. - __helm_debug "Completions are now: $__helm_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __helm_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "helm" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "helm " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c helm -e - -# this will get called after the two calls below and clear the $__helm_perform_completion_once_result global -complete -c helm -n '__helm_clear_perform_completion_once_result' -# The call to __helm_prepare_completions will setup __helm_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c helm -n 'not __helm_requires_order_preservation && __helm_prepare_completions' -f -a '$__helm_comp_results' -# otherwise we use the -k flag -complete -k -c helm -n '__helm_requires_order_preservation && __helm_prepare_completions' -f -a '$__helm_comp_results' diff --git a/fish/.config/fish/completions/k9s.fish b/fish/.config/fish/completions/k9s.fish deleted file mode 100644 index 4abdbd4..0000000 --- a/fish/.config/fish/completions/k9s.fish +++ /dev/null @@ -1,235 +0,0 @@ -# fish completion for k9s -*- shell-script -*- - -function __k9s_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __k9s_perform_completion - __k9s_debug "Starting __k9s_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __k9s_debug "args: $args" - __k9s_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "K9S_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __k9s_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __k9s_debug "Comps: $comps" - __k9s_debug "DirectiveLine: $directiveLine" - __k9s_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __k9s_perform_completion, by caching the result behind $__k9s_perform_completion_once_result -function __k9s_perform_completion_once - __k9s_debug "Starting __k9s_perform_completion_once" - - if test -n "$__k9s_perform_completion_once_result" - __k9s_debug "Seems like a valid result already exists, skipping __k9s_perform_completion" - return 0 - end - - set --global __k9s_perform_completion_once_result (__k9s_perform_completion) - if test -z "$__k9s_perform_completion_once_result" - __k9s_debug "No completions, probably due to a failure" - return 1 - end - - __k9s_debug "Performed completions and set __k9s_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__k9s_perform_completion_once_result variable after completions are run -function __k9s_clear_perform_completion_once_result - __k9s_debug "" - __k9s_debug "========= clearing previously set __k9s_perform_completion_once_result variable ==========" - set --erase __k9s_perform_completion_once_result - __k9s_debug "Successfully erased the variable __k9s_perform_completion_once_result" -end - -function __k9s_requires_order_preservation - __k9s_debug "" - __k9s_debug "========= checking if order preservation is required ==========" - - __k9s_perform_completion_once - if test -z "$__k9s_perform_completion_once_result" - __k9s_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__k9s_perform_completion_once_result[-1]) - __k9s_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __k9s_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __k9s_debug "This does require order preservation" - return 0 - end - - __k9s_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __k9s_comp_results -# - Return false if file completion should be performed -function __k9s_prepare_completions - __k9s_debug "" - __k9s_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __k9s_comp_results - - __k9s_perform_completion_once - __k9s_debug "Completion results: $__k9s_perform_completion_once_result" - - if test -z "$__k9s_perform_completion_once_result" - __k9s_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__k9s_perform_completion_once_result[-1]) - set --global __k9s_comp_results $__k9s_perform_completion_once_result[1..-2] - - __k9s_debug "Completions are: $__k9s_comp_results" - __k9s_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __k9s_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __k9s_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __k9s_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __k9s_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__k9s_comp_results) - set --global __k9s_comp_results $completions - __k9s_debug "Filtered completions are: $__k9s_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__k9s_comp_results) - __k9s_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__k9s_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __k9s_debug "Adding second completion to perform nospace directive" - set --global __k9s_comp_results $split[1] $split[1]. - __k9s_debug "Completions are now: $__k9s_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __k9s_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "k9s" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "k9s " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c k9s -e - -# this will get called after the two calls below and clear the $__k9s_perform_completion_once_result global -complete -c k9s -n '__k9s_clear_perform_completion_once_result' -# The call to __k9s_prepare_completions will setup __k9s_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c k9s -n 'not __k9s_requires_order_preservation && __k9s_prepare_completions' -f -a '$__k9s_comp_results' -# otherwise we use the -k flag -complete -k -c k9s -n '__k9s_requires_order_preservation && __k9s_prepare_completions' -f -a '$__k9s_comp_results' diff --git a/fish/.config/fish/completions/kind.fish b/fish/.config/fish/completions/kind.fish deleted file mode 100644 index 91fe90c..0000000 --- a/fish/.config/fish/completions/kind.fish +++ /dev/null @@ -1,176 +0,0 @@ -# fish completion for kind -*- shell-script -*- - -function __kind_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __kind_perform_completion - __kind_debug "Starting __kind_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __kind_debug "args: $args" - __kind_debug "last arg: $lastArg" - - set -l requestComp "$args[1] __complete $args[2..-1] $lastArg" - - __kind_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __kind_debug "Comps: $comps" - __kind_debug "DirectiveLine: $directiveLine" - __kind_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# This function does two things: -# - Obtain the completions and store them in the global __kind_comp_results -# - Return false if file completion should be performed -function __kind_prepare_completions - __kind_debug "" - __kind_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __kind_comp_results - - set -l results (__kind_perform_completion) - __kind_debug "Completion results: $results" - - if test -z "$results" - __kind_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $results[-1]) - set --global __kind_comp_results $results[1..-2] - - __kind_debug "Completions are: $__kind_comp_results" - __kind_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __kind_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __kind_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __kind_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __kind_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__kind_comp_results) - set --global __kind_comp_results $completions - __kind_debug "Filtered completions are: $__kind_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__kind_comp_results) - __kind_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__kind_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __kind_debug "Adding second completion to perform nospace directive" - set --global __kind_comp_results $split[1] $split[1]. - __kind_debug "Completions are now: $__kind_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __kind_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "kind" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "kind " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c kind -e - -# The call to __kind_prepare_completions will setup __kind_comp_results -# which provides the program's completion choices. -complete -c kind -n '__kind_prepare_completions' -f -a '$__kind_comp_results' - diff --git a/fish/.config/fish/completions/kubebuilder.fish b/fish/.config/fish/completions/kubebuilder.fish deleted file mode 100644 index 3d5dd70..0000000 --- a/fish/.config/fish/completions/kubebuilder.fish +++ /dev/null @@ -1,235 +0,0 @@ -# fish completion for kubebuilder -*- shell-script -*- - -function __kubebuilder_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __kubebuilder_perform_completion - __kubebuilder_debug "Starting __kubebuilder_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __kubebuilder_debug "args: $args" - __kubebuilder_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "KUBEBUILDER_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __kubebuilder_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __kubebuilder_debug "Comps: $comps" - __kubebuilder_debug "DirectiveLine: $directiveLine" - __kubebuilder_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __kubebuilder_perform_completion, by caching the result behind $__kubebuilder_perform_completion_once_result -function __kubebuilder_perform_completion_once - __kubebuilder_debug "Starting __kubebuilder_perform_completion_once" - - if test -n "$__kubebuilder_perform_completion_once_result" - __kubebuilder_debug "Seems like a valid result already exists, skipping __kubebuilder_perform_completion" - return 0 - end - - set --global __kubebuilder_perform_completion_once_result (__kubebuilder_perform_completion) - if test -z "$__kubebuilder_perform_completion_once_result" - __kubebuilder_debug "No completions, probably due to a failure" - return 1 - end - - __kubebuilder_debug "Performed completions and set __kubebuilder_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__kubebuilder_perform_completion_once_result variable after completions are run -function __kubebuilder_clear_perform_completion_once_result - __kubebuilder_debug "" - __kubebuilder_debug "========= clearing previously set __kubebuilder_perform_completion_once_result variable ==========" - set --erase __kubebuilder_perform_completion_once_result - __kubebuilder_debug "Successfully erased the variable __kubebuilder_perform_completion_once_result" -end - -function __kubebuilder_requires_order_preservation - __kubebuilder_debug "" - __kubebuilder_debug "========= checking if order preservation is required ==========" - - __kubebuilder_perform_completion_once - if test -z "$__kubebuilder_perform_completion_once_result" - __kubebuilder_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__kubebuilder_perform_completion_once_result[-1]) - __kubebuilder_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __kubebuilder_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __kubebuilder_debug "This does require order preservation" - return 0 - end - - __kubebuilder_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __kubebuilder_comp_results -# - Return false if file completion should be performed -function __kubebuilder_prepare_completions - __kubebuilder_debug "" - __kubebuilder_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __kubebuilder_comp_results - - __kubebuilder_perform_completion_once - __kubebuilder_debug "Completion results: $__kubebuilder_perform_completion_once_result" - - if test -z "$__kubebuilder_perform_completion_once_result" - __kubebuilder_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__kubebuilder_perform_completion_once_result[-1]) - set --global __kubebuilder_comp_results $__kubebuilder_perform_completion_once_result[1..-2] - - __kubebuilder_debug "Completions are: $__kubebuilder_comp_results" - __kubebuilder_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __kubebuilder_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __kubebuilder_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __kubebuilder_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __kubebuilder_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__kubebuilder_comp_results) - set --global __kubebuilder_comp_results $completions - __kubebuilder_debug "Filtered completions are: $__kubebuilder_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__kubebuilder_comp_results) - __kubebuilder_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__kubebuilder_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __kubebuilder_debug "Adding second completion to perform nospace directive" - set --global __kubebuilder_comp_results $split[1] $split[1]. - __kubebuilder_debug "Completions are now: $__kubebuilder_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __kubebuilder_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "kubebuilder" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "kubebuilder " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c kubebuilder -e - -# this will get called after the two calls below and clear the $__kubebuilder_perform_completion_once_result global -complete -c kubebuilder -n '__kubebuilder_clear_perform_completion_once_result' -# The call to __kubebuilder_prepare_completions will setup __kubebuilder_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c kubebuilder -n 'not __kubebuilder_requires_order_preservation && __kubebuilder_prepare_completions' -f -a '$__kubebuilder_comp_results' -# otherwise we use the -k flag -complete -k -c kubebuilder -n '__kubebuilder_requires_order_preservation && __kubebuilder_prepare_completions' -f -a '$__kubebuilder_comp_results' diff --git a/fish/.config/fish/completions/kubectl.fish b/fish/.config/fish/completions/kubectl.fish deleted file mode 100644 index 8fa455e..0000000 --- a/fish/.config/fish/completions/kubectl.fish +++ /dev/null @@ -1,249 +0,0 @@ - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# fish completion for kubectl -*- shell-script -*- - -function __kubectl_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __kubectl_perform_completion - __kubectl_debug "Starting __kubectl_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __kubectl_debug "args: $args" - __kubectl_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "KUBECTL_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __kubectl_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __kubectl_debug "Comps: $comps" - __kubectl_debug "DirectiveLine: $directiveLine" - __kubectl_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __kubectl_perform_completion, by caching the result behind $__kubectl_perform_completion_once_result -function __kubectl_perform_completion_once - __kubectl_debug "Starting __kubectl_perform_completion_once" - - if test -n "$__kubectl_perform_completion_once_result" - __kubectl_debug "Seems like a valid result already exists, skipping __kubectl_perform_completion" - return 0 - end - - set --global __kubectl_perform_completion_once_result (__kubectl_perform_completion) - if test -z "$__kubectl_perform_completion_once_result" - __kubectl_debug "No completions, probably due to a failure" - return 1 - end - - __kubectl_debug "Performed completions and set __kubectl_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__kubectl_perform_completion_once_result variable after completions are run -function __kubectl_clear_perform_completion_once_result - __kubectl_debug "" - __kubectl_debug "========= clearing previously set __kubectl_perform_completion_once_result variable ==========" - set --erase __kubectl_perform_completion_once_result - __kubectl_debug "Successfully erased the variable __kubectl_perform_completion_once_result" -end - -function __kubectl_requires_order_preservation - __kubectl_debug "" - __kubectl_debug "========= checking if order preservation is required ==========" - - __kubectl_perform_completion_once - if test -z "$__kubectl_perform_completion_once_result" - __kubectl_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__kubectl_perform_completion_once_result[-1]) - __kubectl_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __kubectl_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __kubectl_debug "This does require order preservation" - return 0 - end - - __kubectl_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __kubectl_comp_results -# - Return false if file completion should be performed -function __kubectl_prepare_completions - __kubectl_debug "" - __kubectl_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __kubectl_comp_results - - __kubectl_perform_completion_once - __kubectl_debug "Completion results: $__kubectl_perform_completion_once_result" - - if test -z "$__kubectl_perform_completion_once_result" - __kubectl_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__kubectl_perform_completion_once_result[-1]) - set --global __kubectl_comp_results $__kubectl_perform_completion_once_result[1..-2] - - __kubectl_debug "Completions are: $__kubectl_comp_results" - __kubectl_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __kubectl_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __kubectl_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __kubectl_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __kubectl_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__kubectl_comp_results) - set --global __kubectl_comp_results $completions - __kubectl_debug "Filtered completions are: $__kubectl_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__kubectl_comp_results) - __kubectl_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__kubectl_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __kubectl_debug "Adding second completion to perform nospace directive" - set --global __kubectl_comp_results $split[1] $split[1]. - __kubectl_debug "Completions are now: $__kubectl_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __kubectl_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "kubectl" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "kubectl " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c kubectl -e - -# this will get called after the two calls below and clear the $__kubectl_perform_completion_once_result global -complete -c kubectl -n '__kubectl_clear_perform_completion_once_result' -# The call to __kubectl_prepare_completions will setup __kubectl_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c kubectl -n 'not __kubectl_requires_order_preservation && __kubectl_prepare_completions' -f -a '$__kubectl_comp_results' -# otherwise we use the -k flag -complete -k -c kubectl -n '__kubectl_requires_order_preservation && __kubectl_prepare_completions' -f -a '$__kubectl_comp_results' diff --git a/fish/.config/fish/completions/minikube.fish b/fish/.config/fish/completions/minikube.fish deleted file mode 100644 index e75dc8b..0000000 --- a/fish/.config/fish/completions/minikube.fish +++ /dev/null @@ -1,249 +0,0 @@ - -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# fish completion for minikube -*- shell-script -*- - -function __minikube_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __minikube_perform_completion - __minikube_debug "Starting __minikube_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __minikube_debug "args: $args" - __minikube_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "MINIKUBE_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __minikube_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __minikube_debug "Comps: $comps" - __minikube_debug "DirectiveLine: $directiveLine" - __minikube_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __minikube_perform_completion, by caching the result behind $__minikube_perform_completion_once_result -function __minikube_perform_completion_once - __minikube_debug "Starting __minikube_perform_completion_once" - - if test -n "$__minikube_perform_completion_once_result" - __minikube_debug "Seems like a valid result already exists, skipping __minikube_perform_completion" - return 0 - end - - set --global __minikube_perform_completion_once_result (__minikube_perform_completion) - if test -z "$__minikube_perform_completion_once_result" - __minikube_debug "No completions, probably due to a failure" - return 1 - end - - __minikube_debug "Performed completions and set __minikube_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__minikube_perform_completion_once_result variable after completions are run -function __minikube_clear_perform_completion_once_result - __minikube_debug "" - __minikube_debug "========= clearing previously set __minikube_perform_completion_once_result variable ==========" - set --erase __minikube_perform_completion_once_result - __minikube_debug "Successfully erased the variable __minikube_perform_completion_once_result" -end - -function __minikube_requires_order_preservation - __minikube_debug "" - __minikube_debug "========= checking if order preservation is required ==========" - - __minikube_perform_completion_once - if test -z "$__minikube_perform_completion_once_result" - __minikube_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__minikube_perform_completion_once_result[-1]) - __minikube_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __minikube_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __minikube_debug "This does require order preservation" - return 0 - end - - __minikube_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __minikube_comp_results -# - Return false if file completion should be performed -function __minikube_prepare_completions - __minikube_debug "" - __minikube_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __minikube_comp_results - - __minikube_perform_completion_once - __minikube_debug "Completion results: $__minikube_perform_completion_once_result" - - if test -z "$__minikube_perform_completion_once_result" - __minikube_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__minikube_perform_completion_once_result[-1]) - set --global __minikube_comp_results $__minikube_perform_completion_once_result[1..-2] - - __minikube_debug "Completions are: $__minikube_comp_results" - __minikube_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __minikube_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __minikube_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __minikube_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __minikube_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__minikube_comp_results) - set --global __minikube_comp_results $completions - __minikube_debug "Filtered completions are: $__minikube_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__minikube_comp_results) - __minikube_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__minikube_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __minikube_debug "Adding second completion to perform nospace directive" - set --global __minikube_comp_results $split[1] $split[1]. - __minikube_debug "Completions are now: $__minikube_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __minikube_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "minikube" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "minikube " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c minikube -e - -# this will get called after the two calls below and clear the $__minikube_perform_completion_once_result global -complete -c minikube -n '__minikube_clear_perform_completion_once_result' -# The call to __minikube_prepare_completions will setup __minikube_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c minikube -n 'not __minikube_requires_order_preservation && __minikube_prepare_completions' -f -a '$__minikube_comp_results' -# otherwise we use the -k flag -complete -k -c minikube -n '__minikube_requires_order_preservation && __minikube_prepare_completions' -f -a '$__minikube_comp_results' diff --git a/fish/.config/fish/completions/oc.fish b/fish/.config/fish/completions/oc.fish deleted file mode 100644 index a97c016..0000000 --- a/fish/.config/fish/completions/oc.fish +++ /dev/null @@ -1,236 +0,0 @@ - -# fish completion for oc -*- shell-script -*- - -function __oc_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __oc_perform_completion - __oc_debug "Starting __oc_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __oc_debug "args: $args" - __oc_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "OC_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __oc_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __oc_debug "Comps: $comps" - __oc_debug "DirectiveLine: $directiveLine" - __oc_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __oc_perform_completion, by caching the result behind $__oc_perform_completion_once_result -function __oc_perform_completion_once - __oc_debug "Starting __oc_perform_completion_once" - - if test -n "$__oc_perform_completion_once_result" - __oc_debug "Seems like a valid result already exists, skipping __oc_perform_completion" - return 0 - end - - set --global __oc_perform_completion_once_result (__oc_perform_completion) - if test -z "$__oc_perform_completion_once_result" - __oc_debug "No completions, probably due to a failure" - return 1 - end - - __oc_debug "Performed completions and set __oc_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__oc_perform_completion_once_result variable after completions are run -function __oc_clear_perform_completion_once_result - __oc_debug "" - __oc_debug "========= clearing previously set __oc_perform_completion_once_result variable ==========" - set --erase __oc_perform_completion_once_result - __oc_debug "Successfully erased the variable __oc_perform_completion_once_result" -end - -function __oc_requires_order_preservation - __oc_debug "" - __oc_debug "========= checking if order preservation is required ==========" - - __oc_perform_completion_once - if test -z "$__oc_perform_completion_once_result" - __oc_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__oc_perform_completion_once_result[-1]) - __oc_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __oc_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __oc_debug "This does require order preservation" - return 0 - end - - __oc_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __oc_comp_results -# - Return false if file completion should be performed -function __oc_prepare_completions - __oc_debug "" - __oc_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __oc_comp_results - - __oc_perform_completion_once - __oc_debug "Completion results: $__oc_perform_completion_once_result" - - if test -z "$__oc_perform_completion_once_result" - __oc_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__oc_perform_completion_once_result[-1]) - set --global __oc_comp_results $__oc_perform_completion_once_result[1..-2] - - __oc_debug "Completions are: $__oc_comp_results" - __oc_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __oc_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __oc_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __oc_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __oc_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__oc_comp_results) - set --global __oc_comp_results $completions - __oc_debug "Filtered completions are: $__oc_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__oc_comp_results) - __oc_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__oc_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __oc_debug "Adding second completion to perform nospace directive" - set --global __oc_comp_results $split[1] $split[1]. - __oc_debug "Completions are now: $__oc_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __oc_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "oc" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "oc " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c oc -e - -# this will get called after the two calls below and clear the $__oc_perform_completion_once_result global -complete -c oc -n '__oc_clear_perform_completion_once_result' -# The call to __oc_prepare_completions will setup __oc_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c oc -n 'not __oc_requires_order_preservation && __oc_prepare_completions' -f -a '$__oc_comp_results' -# otherwise we use the -k flag -complete -k -c oc -n '__oc_requires_order_preservation && __oc_prepare_completions' -f -a '$__oc_comp_results' diff --git a/fish/.config/fish/completions/operator-sdk.fish b/fish/.config/fish/completions/operator-sdk.fish deleted file mode 100644 index 2f44134..0000000 --- a/fish/.config/fish/completions/operator-sdk.fish +++ /dev/null @@ -1,235 +0,0 @@ -# fish completion for operator-sdk -*- shell-script -*- - -function __operator_sdk_debug - set -l file "$BASH_COMP_DEBUG_FILE" - if test -n "$file" - echo "$argv" >> $file - end -end - -function __operator_sdk_perform_completion - __operator_sdk_debug "Starting __operator_sdk_perform_completion" - - # Extract all args except the last one - set -l args (commandline -opc) - # Extract the last arg and escape it in case it is a space - set -l lastArg (string escape -- (commandline -ct)) - - __operator_sdk_debug "args: $args" - __operator_sdk_debug "last arg: $lastArg" - - # Disable ActiveHelp which is not supported for fish shell - set -l requestComp "OPERATOR_SDK_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" - - __operator_sdk_debug "Calling $requestComp" - set -l results (eval $requestComp 2> /dev/null) - - # Some programs may output extra empty lines after the directive. - # Let's ignore them or else it will break completion. - # Ref: https://github.com/spf13/cobra/issues/1279 - for line in $results[-1..1] - if test (string trim -- $line) = "" - # Found an empty line, remove it - set results $results[1..-2] - else - # Found non-empty line, we have our proper output - break - end - end - - set -l comps $results[1..-2] - set -l directiveLine $results[-1] - - # For Fish, when completing a flag with an = (e.g., -n=) - # completions must be prefixed with the flag - set -l flagPrefix (string match -r -- '-.*=' "$lastArg") - - __operator_sdk_debug "Comps: $comps" - __operator_sdk_debug "DirectiveLine: $directiveLine" - __operator_sdk_debug "flagPrefix: $flagPrefix" - - for comp in $comps - printf "%s%s\n" "$flagPrefix" "$comp" - end - - printf "%s\n" "$directiveLine" -end - -# this function limits calls to __operator_sdk_perform_completion, by caching the result behind $__operator_sdk_perform_completion_once_result -function __operator_sdk_perform_completion_once - __operator_sdk_debug "Starting __operator_sdk_perform_completion_once" - - if test -n "$__operator_sdk_perform_completion_once_result" - __operator_sdk_debug "Seems like a valid result already exists, skipping __operator_sdk_perform_completion" - return 0 - end - - set --global __operator_sdk_perform_completion_once_result (__operator_sdk_perform_completion) - if test -z "$__operator_sdk_perform_completion_once_result" - __operator_sdk_debug "No completions, probably due to a failure" - return 1 - end - - __operator_sdk_debug "Performed completions and set __operator_sdk_perform_completion_once_result" - return 0 -end - -# this function is used to clear the $__operator_sdk_perform_completion_once_result variable after completions are run -function __operator_sdk_clear_perform_completion_once_result - __operator_sdk_debug "" - __operator_sdk_debug "========= clearing previously set __operator_sdk_perform_completion_once_result variable ==========" - set --erase __operator_sdk_perform_completion_once_result - __operator_sdk_debug "Successfully erased the variable __operator_sdk_perform_completion_once_result" -end - -function __operator_sdk_requires_order_preservation - __operator_sdk_debug "" - __operator_sdk_debug "========= checking if order preservation is required ==========" - - __operator_sdk_perform_completion_once - if test -z "$__operator_sdk_perform_completion_once_result" - __operator_sdk_debug "Error determining if order preservation is required" - return 1 - end - - set -l directive (string sub --start 2 $__operator_sdk_perform_completion_once_result[-1]) - __operator_sdk_debug "Directive is: $directive" - - set -l shellCompDirectiveKeepOrder 32 - set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) - __operator_sdk_debug "Keeporder is: $keeporder" - - if test $keeporder -ne 0 - __operator_sdk_debug "This does require order preservation" - return 0 - end - - __operator_sdk_debug "This doesn't require order preservation" - return 1 -end - - -# This function does two things: -# - Obtain the completions and store them in the global __operator_sdk_comp_results -# - Return false if file completion should be performed -function __operator_sdk_prepare_completions - __operator_sdk_debug "" - __operator_sdk_debug "========= starting completion logic ==========" - - # Start fresh - set --erase __operator_sdk_comp_results - - __operator_sdk_perform_completion_once - __operator_sdk_debug "Completion results: $__operator_sdk_perform_completion_once_result" - - if test -z "$__operator_sdk_perform_completion_once_result" - __operator_sdk_debug "No completion, probably due to a failure" - # Might as well do file completion, in case it helps - return 1 - end - - set -l directive (string sub --start 2 $__operator_sdk_perform_completion_once_result[-1]) - set --global __operator_sdk_comp_results $__operator_sdk_perform_completion_once_result[1..-2] - - __operator_sdk_debug "Completions are: $__operator_sdk_comp_results" - __operator_sdk_debug "Directive is: $directive" - - set -l shellCompDirectiveError 1 - set -l shellCompDirectiveNoSpace 2 - set -l shellCompDirectiveNoFileComp 4 - set -l shellCompDirectiveFilterFileExt 8 - set -l shellCompDirectiveFilterDirs 16 - - if test -z "$directive" - set directive 0 - end - - set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) - if test $compErr -eq 1 - __operator_sdk_debug "Received error directive: aborting." - # Might as well do file completion, in case it helps - return 1 - end - - set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) - set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) - if test $filefilter -eq 1; or test $dirfilter -eq 1 - __operator_sdk_debug "File extension filtering or directory filtering not supported" - # Do full file completion instead - return 1 - end - - set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) - set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) - - __operator_sdk_debug "nospace: $nospace, nofiles: $nofiles" - - # If we want to prevent a space, or if file completion is NOT disabled, - # we need to count the number of valid completions. - # To do so, we will filter on prefix as the completions we have received - # may not already be filtered so as to allow fish to match on different - # criteria than the prefix. - if test $nospace -ne 0; or test $nofiles -eq 0 - set -l prefix (commandline -t | string escape --style=regex) - __operator_sdk_debug "prefix: $prefix" - - set -l completions (string match -r -- "^$prefix.*" $__operator_sdk_comp_results) - set --global __operator_sdk_comp_results $completions - __operator_sdk_debug "Filtered completions are: $__operator_sdk_comp_results" - - # Important not to quote the variable for count to work - set -l numComps (count $__operator_sdk_comp_results) - __operator_sdk_debug "numComps: $numComps" - - if test $numComps -eq 1; and test $nospace -ne 0 - # We must first split on \t to get rid of the descriptions to be - # able to check what the actual completion will be. - # We don't need descriptions anyway since there is only a single - # real completion which the shell will expand immediately. - set -l split (string split --max 1 \t $__operator_sdk_comp_results[1]) - - # Fish won't add a space if the completion ends with any - # of the following characters: @=/:., - set -l lastChar (string sub -s -1 -- $split) - if not string match -r -q "[@=/:.,]" -- "$lastChar" - # In other cases, to support the "nospace" directive we trick the shell - # by outputting an extra, longer completion. - __operator_sdk_debug "Adding second completion to perform nospace directive" - set --global __operator_sdk_comp_results $split[1] $split[1]. - __operator_sdk_debug "Completions are now: $__operator_sdk_comp_results" - end - end - - if test $numComps -eq 0; and test $nofiles -eq 0 - # To be consistent with bash and zsh, we only trigger file - # completion when there are no other completions - __operator_sdk_debug "Requesting file completion" - return 1 - end - end - - return 0 -end - -# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves -# so we can properly delete any completions provided by another script. -# Only do this if the program can be found, or else fish may print some errors; besides, -# the existing completions will only be loaded if the program can be found. -if type -q "operator-sdk" - # The space after the program name is essential to trigger completion for the program - # and not completion of the program name itself. - # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. - complete --do-complete "operator-sdk " > /dev/null 2>&1 -end - -# Remove any pre-existing completions for the program since we will be handling all of them. -complete -c operator-sdk -e - -# this will get called after the two calls below and clear the $__operator_sdk_perform_completion_once_result global -complete -c operator-sdk -n '__operator_sdk_clear_perform_completion_once_result' -# The call to __operator_sdk_prepare_completions will setup __operator_sdk_comp_results -# which provides the program's completion choices. -# If this doesn't require order preservation, we don't use the -k flag -complete -c operator-sdk -n 'not __operator_sdk_requires_order_preservation && __operator_sdk_prepare_completions' -f -a '$__operator_sdk_comp_results' -# otherwise we use the -k flag -complete -k -c operator-sdk -n '__operator_sdk_requires_order_preservation && __operator_sdk_prepare_completions' -f -a '$__operator_sdk_comp_results' diff --git a/fish/.config/fish/completions/poetry.fish b/fish/.config/fish/completions/poetry.fish deleted file mode 100644 index 287ad63..0000000 --- a/fish/.config/fish/completions/poetry.fish +++ /dev/null @@ -1,257 +0,0 @@ -function __fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand - for i in (commandline -opc) - if contains -- $i about add build cache check config debug env export help init install list lock new publish remove run search self shell show source update version - return 1 - end - end - return 0 -end - -# global options -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l ansi -d 'Force ANSI output.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l directory -d 'The working directory for the Poetry command (defaults to the current working directory).' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l help -d 'Display help for the given command. When no command is given display help for the list command.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l no-ansi -d 'Disable ANSI output.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l no-cache -d 'Disables Poetry source caches.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l no-interaction -d 'Do not ask any interactive question.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l no-plugins -d 'Disables plugins.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l quiet -d 'Do not output any message.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l verbose -d 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.' -complete -c poetry -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -l version -d 'Display this application version.' - -# commands -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a about -d 'Shows information about Poetry.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a add -d 'Adds a new dependency to pyproject.toml and installs it.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a build -d 'Builds a package, as a tarball and a wheel by default.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a cache -complete -c poetry -f -n '__fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from clear list' -a clear -d 'Clears a Poetry cache by name.' -complete -c poetry -f -n '__fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from clear list' -a list -d 'List Poetry\'s caches.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a check -d 'Validates the content of the pyproject.toml file and its consistency with the poetry.lock file.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a config -d 'Manages configuration settings.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a debug -complete -c poetry -f -n '__fish_seen_subcommand_from debug; and not __fish_seen_subcommand_from info resolve' -a info -d 'Shows debug information.' -complete -c poetry -f -n '__fish_seen_subcommand_from debug; and not __fish_seen_subcommand_from info resolve' -a resolve -d 'Debugs dependency resolution.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a env -complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from info list remove use' -a info -d 'Displays information about the current environment.' -complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from info list remove use' -a list -d 'Lists all virtualenvs associated with the current project.' -complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from info list remove use' -a remove -d 'Remove virtual environments associated with the project.' -complete -c poetry -f -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from info list remove use' -a use -d 'Activates or creates a new virtualenv for the current project.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a export -d 'Exports the lock file to alternative formats.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a help -d 'Displays help for a command.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a init -d 'Creates a basic pyproject.toml file in the current directory.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a install -d 'Installs the project dependencies.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a list -d 'Lists commands.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a lock -d 'Locks the project dependencies.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a new -d 'Creates a new Python project at .' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a publish -d 'Publishes a package to a remote repository.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a remove -d 'Removes a package from the project dependencies.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a run -d 'Runs a command in the appropriate environment.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a search -d 'Searches for packages on remote repositories.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a self -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a add -d 'Add additional packages to Poetry\'s runtime environment.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a install -d 'Install locked packages (incl. addons) required by this Poetry installation.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a lock -d 'Lock the Poetry installation\'s system requirements.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a remove -d 'Remove additional packages from Poetry\'s runtime environment.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a show -d 'Show packages from Poetry\'s runtime environment.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a plugins -d 'Shows information about the currently installed plugins.' -complete -c poetry -f -n '__fish_seen_subcommand_from self; and not __fish_seen_subcommand_from add install lock remove update show' -a update -d 'Updates Poetry to the latest version.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a shell -d 'Spawns a shell within the virtual environment.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a show -d 'Shows information about packages.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a source -complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a add -d 'Add source configuration for project.' -complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a remove -d 'Remove source configured for the project.' -complete -c poetry -f -n '__fish_seen_subcommand_from source; and not __fish_seen_subcommand_from add remove show' -a show -d 'Show information about sources configured for the project.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a update -d 'Update the dependencies as according to the pyproject.toml file.' -complete -c poetry -f -n '__fish_poetry_b04eeefc2dfbdfae_complete_no_subcommand' -a version -d 'Shows the version of the project or bumps it when a valid bump rule is provided.' - -# command options - -# about - -# add -complete -c poetry -n '__fish_seen_subcommand_from add' -l allow-prereleases -d 'Accept prereleases.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l dev -d 'Add as a development dependency. (Deprecated) Use --group=dev instead.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from add' -l editable -d 'Add vcs/path dependencies as editable.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l extras -d 'Extras to activate for the dependency.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l group -d 'The group to add the dependency to.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l lock -d 'Do not perform operations (only update the lockfile).' -complete -c poetry -n '__fish_seen_subcommand_from add' -l optional -d 'Add as an optional dependency.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l platform -d 'Platforms for which the dependency must be installed.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l python -d 'Python version for which the dependency must be installed.' -complete -c poetry -n '__fish_seen_subcommand_from add' -l source -d 'Name of the source to use to install the package.' - -# build -complete -c poetry -n '__fish_seen_subcommand_from build' -l format -d 'Limit the format to either sdist or wheel.' -complete -c poetry -n '__fish_seen_subcommand_from build' -l output -d 'Set output directory for build artifacts. Default is `dist`.' - -# cache clear -complete -c poetry -n '__fish_seen_subcommand_from cache; and __fish_seen_subcommand_from clear' -l all -d 'Clear all entries in the cache.' - -# cache list - -# check -complete -c poetry -n '__fish_seen_subcommand_from check' -l lock -d 'Checks that poetry.lock exists for the current version of pyproject.toml.' - -# config -complete -c poetry -n '__fish_seen_subcommand_from config' -l list -d 'List configuration settings.' -complete -c poetry -n '__fish_seen_subcommand_from config' -l local -d 'Set/Get from the project\'s local configuration.' -complete -c poetry -n '__fish_seen_subcommand_from config' -l unset -d 'Unset configuration setting.' - -# debug info - -# debug resolve -complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l extras -d 'Extras to activate for the dependency.' -complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l install -d 'Show what would be installed for the current system.' -complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l python -d 'Python version(s) to use for resolution.' -complete -c poetry -n '__fish_seen_subcommand_from debug; and __fish_seen_subcommand_from resolve' -l tree -d 'Display the dependency tree.' - -# env info -complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from info' -l executable -d 'Only display the environment\'s python executable path.' -complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from info' -l path -d 'Only display the environment\'s path.' - -# env list -complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from list' -l full-path -d 'Output the full paths of the virtualenvs.' - -# env remove -complete -c poetry -n '__fish_seen_subcommand_from env; and __fish_seen_subcommand_from remove' -l all -d 'Remove all managed virtual environments associated with the project.' - -# env use - -# export -complete -c poetry -n '__fish_seen_subcommand_from export' -l all-extras -d 'Include all sets of extra dependencies.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l dev -d 'Include development dependencies. (Deprecated)' -complete -c poetry -n '__fish_seen_subcommand_from export' -l extras -d 'Extra sets of dependencies to include.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l format -d 'Format to export to. Currently, only constraints.txt and requirements.txt are supported.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l only -d 'The only dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l output -d 'The name of the output file.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l with -d 'The optional dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l with-credentials -d 'Include credentials for extra indices.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l without -d 'The dependency groups to ignore.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l without-hashes -d 'Exclude hashes from the exported file.' -complete -c poetry -n '__fish_seen_subcommand_from export' -l without-urls -d 'Exclude source repository urls from the exported file.' - -# help - -# init -complete -c poetry -n '__fish_seen_subcommand_from init' -l author -d 'Author name of the package.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l dependency -d 'Package to require, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l description -d 'Description of the package.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l dev-dependency -d 'Package to require for development, with an optional version constraint, e.g. requests:^2.10.0 or requests=2.11.1.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l license -d 'License of the package.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l name -d 'Name of the package.' -complete -c poetry -n '__fish_seen_subcommand_from init' -l python -d 'Compatible Python versions.' - -# install -complete -c poetry -n '__fish_seen_subcommand_from install' -l all-extras -d 'Install all extra dependencies.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l compile -d 'Compile Python source files to bytecode. (This option has no effect if modern-installation is disabled because the old installer always compiles.)' -complete -c poetry -n '__fish_seen_subcommand_from install' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from install' -l extras -d 'Extra sets of dependencies to install.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l no-dev -d 'Do not install the development dependencies. (Deprecated)' -complete -c poetry -n '__fish_seen_subcommand_from install' -l no-directory -d 'Do not install any directory path dependencies; useful to install dependencies without source code, e.g. for caching of Docker layers)' -complete -c poetry -n '__fish_seen_subcommand_from install' -l no-root -d 'Do not install the root package (the current project).' -complete -c poetry -n '__fish_seen_subcommand_from install' -l only -d 'The only dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l only-root -d 'Exclude all dependencies.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l remove-untracked -d 'Removes packages not present in the lock file. (Deprecated)' -complete -c poetry -n '__fish_seen_subcommand_from install' -l sync -d 'Synchronize the environment with the locked packages and the specified groups.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l with -d 'The optional dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from install' -l without -d 'The dependency groups to ignore.' - -# list - -# lock -complete -c poetry -n '__fish_seen_subcommand_from lock' -l check -d 'Check that the poetry.lock file corresponds to the current version of pyproject.toml. (Deprecated) Use poetry check --lock instead.' -complete -c poetry -n '__fish_seen_subcommand_from lock' -l no-update -d 'Do not update locked versions, only refresh lock file.' - -# new -complete -c poetry -n '__fish_seen_subcommand_from new' -l name -d 'Set the resulting package name.' -complete -c poetry -n '__fish_seen_subcommand_from new' -l readme -d 'Specify the readme file format. Default is md.' -complete -c poetry -n '__fish_seen_subcommand_from new' -l src -d 'Use the src layout for the project.' - -# publish -complete -c poetry -n '__fish_seen_subcommand_from publish' -l build -d 'Build the package before publishing.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l cert -d 'Certificate authority to access the repository.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l client-cert -d 'Client certificate to access the repository.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l dist-dir -d 'Dist directory where built artifact are stored. Default is `dist`.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l dry-run -d 'Perform all actions except upload the package.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l password -d 'The password to access the repository.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l repository -d 'The repository to publish the package to.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l skip-existing -d 'Ignore errors from files already existing in the repository.' -complete -c poetry -n '__fish_seen_subcommand_from publish' -l username -d 'The username to access the repository.' - -# remove -complete -c poetry -n '__fish_seen_subcommand_from remove' -l dev -d 'Remove a package from the development dependencies. (Deprecated) Use --group=dev instead.' -complete -c poetry -n '__fish_seen_subcommand_from remove' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from remove' -l group -d 'The group to remove the dependency from.' -complete -c poetry -n '__fish_seen_subcommand_from remove' -l lock -d 'Do not perform operations (only update the lockfile).' - -# run - -# search - -# self add -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l allow-prereleases -d 'Accept prereleases.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l editable -d 'Add vcs/path dependencies as editable.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l extras -d 'Extras to activate for the dependency.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from add' -l source -d 'Name of the source to use to install the package.' - -# self install -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from install' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from install' -l sync -d 'Synchronize the environment with the locked packages and the specified groups.' - -# self lock -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from lock' -l check -d 'Check that the poetry.lock file corresponds to the current version of pyproject.toml. (Deprecated) Use poetry check --lock instead.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from lock' -l no-update -d 'Do not update locked versions, only refresh lock file.' - -# self remove -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from remove' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' - -# self show -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l addons -d 'List only add-on packages installed.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l latest -d 'Show the latest version.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l outdated -d 'Show the latest version but only for packages that are outdated.' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from show' -l tree -d 'List the dependencies as a tree.' - -# self show plugins - -# self update -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from update' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from self; and __fish_seen_subcommand_from update' -l preview -d 'Allow the installation of pre-release versions.' - -# shell - -# show -complete -c poetry -n '__fish_seen_subcommand_from show' -l all -d 'Show all packages (even those not compatible with current system).' -complete -c poetry -n '__fish_seen_subcommand_from show' -l latest -d 'Show the latest version.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l no-dev -d 'Do not list the development dependencies. (Deprecated)' -complete -c poetry -n '__fish_seen_subcommand_from show' -l only -d 'The only dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l outdated -d 'Show the latest version but only for packages that are outdated.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l top-level -d 'Show only top-level dependencies.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l tree -d 'List the dependencies as a tree.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l why -d 'When showing the full list, or a --tree for a single package, display whether they are a direct dependency or required by other packages' -complete -c poetry -n '__fish_seen_subcommand_from show' -l with -d 'The optional dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from show' -l without -d 'The dependency groups to ignore.' - -# source add -complete -c poetry -n '__fish_seen_subcommand_from source; and __fish_seen_subcommand_from add' -l default -d 'Set this source as the default (disable PyPI). A default source will also be the fallback source if you add other sources. (Deprecated, use --priority)' -complete -c poetry -n '__fish_seen_subcommand_from source; and __fish_seen_subcommand_from add' -l priority -d 'Set the priority of this source. One of: default, primary, secondary, supplemental, explicit. Defaults to primary.' -complete -c poetry -n '__fish_seen_subcommand_from source; and __fish_seen_subcommand_from add' -l secondary -d 'Set this source as secondary. (Deprecated, use --priority)' - -# source remove - -# source show - -# update -complete -c poetry -n '__fish_seen_subcommand_from update' -l dry-run -d 'Output the operations but do not execute anything (implicitly enables --verbose).' -complete -c poetry -n '__fish_seen_subcommand_from update' -l lock -d 'Do not perform operations (only update the lockfile).' -complete -c poetry -n '__fish_seen_subcommand_from update' -l no-dev -d 'Do not update the development dependencies. (Deprecated)' -complete -c poetry -n '__fish_seen_subcommand_from update' -l only -d 'The only dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from update' -l sync -d 'Synchronize the environment with the locked packages and the specified groups.' -complete -c poetry -n '__fish_seen_subcommand_from update' -l with -d 'The optional dependency groups to include.' -complete -c poetry -n '__fish_seen_subcommand_from update' -l without -d 'The dependency groups to ignore.' - -# version -complete -c poetry -n '__fish_seen_subcommand_from version' -l dry-run -d 'Do not update pyproject.toml file' -complete -c poetry -n '__fish_seen_subcommand_from version' -l next-phase -d 'Increment the phase of the current version' -complete -c poetry -n '__fish_seen_subcommand_from version' -l short -d 'Output the version number only' diff --git a/fish/.config/fish/completions/ya.fish b/fish/.config/fish/completions/ya.fish deleted file mode 100644 index 2c869c5..0000000 --- a/fish/.config/fish/completions/ya.fish +++ /dev/null @@ -1,52 +0,0 @@ -# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. -function __fish_ya_global_optspecs - string join \n V/version h/help -end - -function __fish_ya_needs_command - # Figure out if the current invocation already has a command. - set -l cmd (commandline -opc) - set -e cmd[1] - argparse -s (__fish_ya_global_optspecs) -- $cmd 2>/dev/null - or return - if set -q argv[1] - # Also print the command, so this can be used to figure out what it is. - echo $argv[1] - return 1 - end - return 0 -end - -function __fish_ya_using_subcommand - set -l cmd (__fish_ya_needs_command) - test -z "$cmd" - and return 1 - contains -- $cmd[1] $argv -end - -complete -c ya -n "__fish_ya_needs_command" -s V -l version -d 'Print version' -complete -c ya -n "__fish_ya_needs_command" -s h -l help -d 'Print help' -complete -c ya -n "__fish_ya_needs_command" -f -a "pub" -d 'Publish a message to the current instance' -complete -c ya -n "__fish_ya_needs_command" -f -a "pub-to" -d 'Publish a message to the specified instance' -complete -c ya -n "__fish_ya_needs_command" -f -a "sub" -d 'Subscribe to messages from all remote instances' -complete -c ya -n "__fish_ya_needs_command" -f -a "pack" -d 'Manage packages' -complete -c ya -n "__fish_ya_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' -complete -c ya -n "__fish_ya_using_subcommand pub" -l str -d 'Send the message with a string body' -r -complete -c ya -n "__fish_ya_using_subcommand pub" -l json -d 'Send the message with a JSON body' -r -complete -c ya -n "__fish_ya_using_subcommand pub" -l list -d 'Send the message as string of list' -r -complete -c ya -n "__fish_ya_using_subcommand pub" -s h -l help -d 'Print help' -complete -c ya -n "__fish_ya_using_subcommand pub-to" -l str -d 'Send the message with a string body' -r -complete -c ya -n "__fish_ya_using_subcommand pub-to" -l json -d 'Send the message with a JSON body' -r -complete -c ya -n "__fish_ya_using_subcommand pub-to" -l list -d 'Send the message as string of list' -r -complete -c ya -n "__fish_ya_using_subcommand pub-to" -s h -l help -d 'Print help' -complete -c ya -n "__fish_ya_using_subcommand sub" -s h -l help -d 'Print help' -complete -c ya -n "__fish_ya_using_subcommand pack" -s a -l add -d 'Add a package' -r -complete -c ya -n "__fish_ya_using_subcommand pack" -s i -l install -d 'Install all packages' -complete -c ya -n "__fish_ya_using_subcommand pack" -s l -l list -d 'List all packages' -complete -c ya -n "__fish_ya_using_subcommand pack" -s u -l upgrade -d 'Upgrade all packages' -complete -c ya -n "__fish_ya_using_subcommand pack" -s h -l help -d 'Print help' -complete -c ya -n "__fish_ya_using_subcommand help; and not __fish_seen_subcommand_from pub pub-to sub pack help" -f -a "pub" -d 'Publish a message to the current instance' -complete -c ya -n "__fish_ya_using_subcommand help; and not __fish_seen_subcommand_from pub pub-to sub pack help" -f -a "pub-to" -d 'Publish a message to the specified instance' -complete -c ya -n "__fish_ya_using_subcommand help; and not __fish_seen_subcommand_from pub pub-to sub pack help" -f -a "sub" -d 'Subscribe to messages from all remote instances' -complete -c ya -n "__fish_ya_using_subcommand help; and not __fish_seen_subcommand_from pub pub-to sub pack help" -f -a "pack" -d 'Manage packages' -complete -c ya -n "__fish_ya_using_subcommand help; and not __fish_seen_subcommand_from pub pub-to sub pack help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' diff --git a/fish/.config/fish/completions/yazi.fish b/fish/.config/fish/completions/yazi.fish deleted file mode 100644 index cd243b0..0000000 --- a/fish/.config/fish/completions/yazi.fish +++ /dev/null @@ -1,9 +0,0 @@ -complete -c yazi -l cwd-file -d 'Write the cwd on exit to this file' -r -F -complete -c yazi -l chooser-file -d 'Write the selected files to this file on open fired' -r -F -complete -c yazi -l client-id -d 'Use the specified client ID, must be a globally unique number' -r -complete -c yazi -l local-events -d 'Report the specified local events to stdout' -r -complete -c yazi -l remote-events -d 'Report the specified remote events to stdout' -r -complete -c yazi -l clear-cache -d 'Clear the cache directory' -complete -c yazi -l debug -d 'Print debug information' -complete -c yazi -s V -l version -d 'Print version' -complete -c yazi -s h -l help -d 'Print help' diff --git a/fish/.config/fish/conf.d/done.fish b/fish/.config/fish/conf.d/done.fish deleted file mode 100755 index 6ff631c..0000000 --- a/fish/.config/fish/conf.d/done.fish +++ /dev/null @@ -1,335 +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.19.2 - -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 "