diff --git a/.minttyrc b/.minttyrc index 98ca38d..a23e101 100644 --- a/.minttyrc +++ b/.minttyrc @@ -3,7 +3,7 @@ Transparency=low CursorType=block Font=IBMPlexMono NF -FontHeight=14 +FontHeight=16 BoldAsFont=yes BoldAsColour=no Locale=en_US @@ -34,4 +34,4 @@ BoldMagenta=177,102,177 Cyan=102,204,204 BoldCyan=57,173,173 White=211,208,200 -BoldWhite=242,240,236 \ No newline at end of file +BoldWhite=242,240,236 diff --git a/README.md b/README.md index 6c346e6..6d38f7b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,24 @@ -# Installation +# dotfiles -## Linux Bionic/Tara distributions +These are my dotfiles, useful for my own shell configuration and not much else. Installation is easy, just paste this into your terminal. - sudo apt-get install git python3 ansible ansible-lint && curl -sL https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/master/bin/install-dotfiles.sh | bash && ansible-playbook -i localdev-inventory.yaml linux-bionic-playbook.yaml - -## Just the configuration files and shell scripts - - curl -sL https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/master/bin/install-dotfiles.sh | bash + #!/bin/sh + #Initialization script sourced from Atlassian: https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/ + git clone --bare ssh://git@git.penguincoder.org:2222/penguincoder/dotfiles.git + function config { + /usr/bin/git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME $@ + } + mkdir -p .config-backup + config checkout + if [ $? = 0 ]; then + echo "Checked out config."; + else + echo "Backing up pre-existing dot files."; + config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} + fi; + config checkout + config config status.showUntrackedFiles no + config push --set-upstream origin master + config submodule init + config submodule update + which fc-cache 2>/dev/null && fc-cache -f -v ~/.fonts || true diff --git a/bin/consolo.setup.bash b/bin/consolo.setup.bash deleted file mode 100644 index 93018ea..0000000 --- a/bin/consolo.setup.bash +++ /dev/null @@ -1,3 +0,0 @@ -#export AWS_ACCESS_KEY_ID= -#export AWS_SECRET_ACCESS_KEY= -test -s $HOME/code/vagrant-dev-env/dev-aliases && . $HOME/code/vagrant-dev-env/dev-aliases || true diff --git a/bin/install-dotfiles.sh b/bin/install-dotfiles.sh deleted file mode 100755 index 6f28182..0000000 --- a/bin/install-dotfiles.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -#Initialization script sourced from Atlassian: https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/ -git clone --bare ssh://git@git.penguincoder.org:2222/penguincoder/dotfiles.git -function config { - /usr/bin/git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME $@ -} -mkdir -p .config-backup -config checkout -if [ $? = 0 ]; then - echo "Checked out config."; - else - echo "Backing up pre-existing dot files."; - config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} -fi; -config checkout -config config status.showUntrackedFiles no -config push --set-upstream origin master -config submodule init -config submodule update -which fc-cache 2>/dev/null && fc-cache -f -v ~/.fonts || true diff --git a/bin/kerl.completion.bash b/bin/kerl.completion.bash deleted file mode 100644 index f9e0058..0000000 --- a/bin/kerl.completion.bash +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# bash_completion for kerl - -_kerl() -{ - local cur prev - if type _get_comp_words_by_ref &>/dev/null ; then - _get_comp_words_by_ref cur prev - else - cur=$2 prev=$3 - fi - - case $prev in - kerl) - mapfile -t COMPREPLY < <( compgen -W 'build install update list delete active path status' -- "$cur" ) - ;; - list) - mapfile -t COMPREPLY < <( compgen -W 'releases builds installations' -- "$cur" ) - ;; - build) - if [ "$COMP_CWORD" -eq 2 ]; then - if [ -f "$HOME"/.kerl/otp_releases ]; then - RELEASES=$(cat "$HOME"/.kerl/otp_releases) - fi - mapfile -t COMPREPLY < <( compgen -W "git $RELEASES" -- "$cur") - else - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - mapfile -t COMPREPLY < <( compgen -W "$BUILDS" -- "$cur") - fi - ;; - installation) - if [ -f "$HOME"/.kerl/otp_installations ]; then - PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations) - fi - mapfile -t COMPREPLY < <( compgen -W "$PATHS" -- "$cur") - ;; - install) - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - mapfile -t COMPREPLY < <( compgen -W "$BUILDS" -- "$cur") - ;; - path) - INSTALL_LIST="$HOME"/.kerl/otp_installations - if [ -f "$INSTALL_LIST" ]; then - NAMES=$(cut -d ' ' -f 2 "$INSTALL_LIST" | xargs basename) - fi - mapfile -t COMPREPLY < <( compgen -W "$NAMES" -- "$cur") - ;; - deploy) - if [ "$COMP_CWORD" -eq 3 ]; then - if [ -f "$HOME"/.kerl/otp_installations ]; then - PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations) - fi - fi - mapfile -t COMPREPLY < <( compgen -W "$PATHS" -- "$cur") - ;; - delete) - mapfile -t COMPREPLY < <( compgen -W 'build installation' -- "$cur") - ;; - update) - mapfile -t COMPREPLY < <( compgen -W 'releases' -- "$cur") - ;; - *) - if [ "$COMP_CWORD" -eq 3 ]; then - if [ -f "$HOME"/.kerl/otp_builds ]; then - BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds) - fi - if [ -n "$BUILDS" ]; then - for b in $BUILDS; do - if [ "$prev" = "$b" ]; then - _filedir - return 0 - fi - done - fi - fi - ;; - esac -} -complete -F _kerl kerl diff --git a/bin/kerl.setup.bash b/bin/kerl.setup.bash index 752182d..a4778c4 100644 --- a/bin/kerl.setup.bash +++ b/bin/kerl.setup.bash @@ -1,2 +1,2 @@ #!/bin/bash -test -s "$HOME/.kerl/installs/21.0/activate" && . "$HOME/.kerl/installs/21.0/activate" +test -s "$HOME/.kerl/installs/22.0/activate" && . "$HOME/.kerl/installs/22.0/activate" diff --git a/bin/kubectx b/bin/kubectx deleted file mode 100755 index 0a85429..0000000 --- a/bin/kubectx +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/env bash -# -# kubectx(1) is a utility to manage and switch between kubectl contexts. - -# Copyright 2017 Google Inc. -# -# 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. - -[[ -n $DEBUG ]] && set -x - -set -eou pipefail -IFS=$'\n\t' - -SELF_CMD="$0" -KUBECTX="${XDG_CACHE_HOME:-$HOME/.kube}/kubectx" - -usage() { - cat <<"EOF" -USAGE: - kubectx : list the contexts - kubectx : switch to context - kubectx - : switch to the previous context - kubectx = : rename context to - kubectx =. : rename current-context to - kubectx -d [] : delete context ('.' for current-context) - (this command won't delete the user/cluster entry - that is used by the context) - - kubectx -h,--help : show this message -EOF -} - -exit_err() { - echo >&2 "${1}" - exit 1 -} - -current_context() { - $KUBECTL config view -o=jsonpath='{.current-context}' -} - -get_contexts() { - $KUBECTL config get-contexts -o=name | sort -n -} - -list_contexts() { - set -u pipefail - local cur ctx_list - cur="$(current_context)" || exit_err "error getting current context" - ctx_list=$(get_contexts) || exit_err "error getting context list" - - local yellow darkbg normal - yellow=$(tput setaf 3 || true) - darkbg=$(tput setab 0 || true) - normal=$(tput sgr0 || true) - - local cur_ctx_fg cur_ctx_bg - cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow} - cur_ctx_bg=${KUBECTX_CURRENT_BGCOLOR:-$darkbg} - - for c in $ctx_list; do - if [[ -n "${_KUBECTX_FORCE_COLOR:-}" || \ - -t 1 && -z "${NO_COLOR:-}" ]]; then - # colored output mode - if [[ "${c}" = "${cur}" ]]; then - echo "${cur_ctx_bg}${cur_ctx_fg}${c}${normal}" - else - echo "${c}" - fi - else - echo "${c}" - fi - done -} - -read_context() { - if [[ -f "${KUBECTX}" ]]; then - cat "${KUBECTX}" - fi -} - -save_context() { - local saved - saved="$(read_context)" - - if [[ "${saved}" != "${1}" ]]; then - printf %s "${1}" > "${KUBECTX}" - fi -} - -switch_context() { - $KUBECTL config use-context "${1}" -} - -choose_context_interactive() { - local choice - choice="$(_KUBECTX_FORCE_COLOR=1 \ - FZF_DEFAULT_COMMAND="${SELF_CMD}" \ - fzf --ansi || true)" - if [[ -z "${choice}" ]]; then - echo 2>&1 "error: you did not choose any of the options" - exit 1 - else - set_context "${choice}" - fi -} - -set_context() { - local prev - prev="$(current_context)" || exit_err "error getting current context" - - switch_context "${1}" - - if [[ "${prev}" != "${1}" ]]; then - save_context "${prev}" - fi -} - -swap_context() { - local ctx - ctx="$(read_context)" - if [[ -z "${ctx}" ]]; then - echo "error: No previous context found." >&2 - exit 1 - fi - set_context "${ctx}" -} - -context_exists() { - grep -q ^"${1}"\$ <($KUBECTL config get-contexts -o=name) -} - -rename_context() { - local old_name="${1}" - local new_name="${2}" - - if [[ "${old_name}" == "." ]]; then - old_name="$(current_context)" - fi - - if ! context_exists "${old_name}"; then - echo "error: Context \"${old_name}\" not found, can't rename it." >&2 - exit 1 - fi - - if context_exists "${new_name}"; then - echo "Context \"${new_name}\" exists, deleting..." >&2 - $KUBECTL config delete-context "${new_name}" 1>/dev/null 2>&1 - fi - - $KUBECTL config rename-context "${old_name}" "${new_name}" -} - -delete_contexts() { - for i in "${@}"; do - delete_context "${i}" - done -} - -delete_context() { - local ctx - ctx="${1}" - if [[ "${ctx}" == "." ]]; then - ctx="$(current_context)" || exit_err "error getting current context" - fi - echo "Deleting context \"${ctx}\"..." >&2 - $KUBECTL config delete-context "${ctx}" -} - -main() { - if hash kubectl 2>/dev/null; then - KUBECTL=kubectl - elif hash kubectl.exe 2>/dev/null; then - KUBECTL=kubectl.exe - else - echo >&2 "kubectl is not installed" - exit 1 - fi - - if [[ "$#" -eq 0 ]]; then - if [[ -t 1 && -z "${KUBECTX_IGNORE_FZF:-}" && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then - choose_context_interactive - else - list_contexts - fi - elif [[ "${1}" == "-d" ]]; then - if [[ "$#" -lt 2 ]]; then - echo "error: missing context NAME" >&2 - usage - exit 1 - fi - delete_contexts "${@:2}" - elif [[ "$#" -gt 1 ]]; then - echo "error: too many arguments" >&2 - usage - exit 1 - elif [[ "$#" -eq 1 ]]; then - if [[ "${1}" == "-" ]]; then - swap_context - elif [[ "${1}" == '-h' || "${1}" == '--help' ]]; then - usage - elif [[ "${1}" =~ ^-(.*) ]]; then - echo "error: unrecognized flag \"${1}\"" >&2 - usage - exit 1 - elif [[ "${1}" =~ (.+)=(.+) ]]; then - rename_context "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}" - else - set_context "${1}" - fi - else - usage - exit 1 - fi -} - -main "$@" diff --git a/bin/kubens b/bin/kubens deleted file mode 100755 index 361e3b3..0000000 --- a/bin/kubens +++ /dev/null @@ -1,214 +0,0 @@ -#!/usr/bin/env bash -# -# kubens(1) is a utility to switch between Kubernetes namespaces. - -# Copyright 2017 Google Inc. -# -# 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. - -[[ -n $DEBUG ]] && set -x - -set -eou pipefail -IFS=$'\n\t' - -SELF_CMD="$0" -KUBENS_DIR="${XDG_CACHE_HOME:-$HOME/.kube}/kubens" - -usage() { - cat <<"EOF" -USAGE: - kubens : list the namespaces in the current context - kubens : change the active namespace of current context - kubens - : switch to the previous namespace in this context - kubens -h,--help : show this message -EOF -} - -exit_err() { - echo >&2 "${1}" - exit 1 -} - -current_namespace() { - local cur_ctx - - cur_ctx="$(current_context)" || exit_err "error getting current context" - ns="$($KUBECTL config view -o=jsonpath="{.contexts[?(@.name==\"${cur_ctx}\")].context.namespace}")" \ - || exit_err "error getting current namespace" - - if [[ -z "${ns}" ]]; then - echo "default" - else - echo "${ns}" - fi -} - -current_context() { - $KUBECTL config current-context -} - -get_namespaces() { - $KUBECTL get namespaces -o=jsonpath='{range .items[*].metadata.name}{@}{"\n"}{end}' -} - -escape_context_name() { - echo "${1//\//-}" -} - -namespace_file() { - local ctx="$(escape_context_name "${1}")" - echo "${KUBENS_DIR}/${ctx}" -} - -read_namespace() { - local f - f="$(namespace_file "${1}")" - [[ -f "${f}" ]] && cat "${f}" - return 0 -} - -save_namespace() { - mkdir -p "${KUBENS_DIR}" - local f saved - f="$(namespace_file "${1}")" - saved="$(read_namespace "${1}")" - - if [[ "${saved}" != "${2}" ]]; then - printf %s "${2}" > "${f}" - fi -} - -switch_namespace() { - local ctx="${1}" - $KUBECTL config set-context "${ctx}" --namespace="${2}" - echo "Active namespace is \"${2}\".">&2 -} - -choose_namespace_interactive() { - # directly calling kubens via fzf might fail with a cryptic error like - # "$FZF_DEFAULT_COMMAND failed", so try to see if we can list namespaces - # locally first - if [[ -z "$(list_namespaces)" ]]; then - echo >&2 "error: could not list namespaces (is the cluster accessible?)" - exit 1 - fi - - local choice - choice="$(_KUBECTX_FORCE_COLOR=1 \ - FZF_DEFAULT_COMMAND="${SELF_CMD}" \ - fzf --ansi || true)" - if [[ -z "${choice}" ]]; then - echo 2>&1 "error: you did not choose any of the options" - exit 1 - else - set_namespace "${choice}" - fi -} - -set_namespace() { - local ctx prev - ctx="$(current_context)" || exit_err "error getting current context" - prev="$(current_namespace)" || exit_error "error getting current namespace" - - if grep -q ^"${1}"\$ <(get_namespaces); then - switch_namespace "${ctx}" "${1}" - - if [[ "${prev}" != "${1}" ]]; then - save_namespace "${ctx}" "${prev}" - fi - else - echo "error: no namespace exists with name \"${1}\".">&2 - exit 1 - fi -} - -list_namespaces() { - local yellow darkbg normal - yellow=$(tput setaf 3 || true) - darkbg=$(tput setab 0 || true) - normal=$(tput sgr0 || true) - - local cur_ctx_fg cur_ctx_bg - cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow} - cur_ctx_bg=${KUBECTX_CURRENT_BGCOLOR:-$darkbg} - - local cur ns_list - cur="$(current_namespace)" || exit_err "error getting current namespace" - ns_list=$(get_namespaces) || exit_err "error getting namespace list" - - for c in $ns_list; do - if [[ -n "${_KUBECTX_FORCE_COLOR:-}" || \ - -t 1 && -z "${NO_COLOR:-}" ]]; then - # colored output mode - if [[ "${c}" = "${cur}" ]]; then - echo "${cur_ctx_bg}${cur_ctx_fg}${c}${normal}" - else - echo "${c}" - fi - else - echo "${c}" - fi - done -} - -swap_namespace() { - local ctx ns - ctx="$(current_context)" || exit_err "error getting current context" - ns="$(read_namespace "${ctx}")" - if [[ -z "${ns}" ]]; then - echo "error: No previous namespace found for current context." >&2 - exit 1 - fi - set_namespace "${ns}" -} - -main() { - if [[ -z "${KUBECTL:-}" ]]; then - if hash kubectl 2>/dev/null; then - KUBECTL=kubectl - elif hash kubectl.exe 2>/dev/null; then - KUBECTL=kubectl.exe - else - echo >&2 "kubectl is not installed" - exit 1 - fi - fi - - if [[ "$#" -eq 0 ]]; then - if [[ -t 1 && -z ${KUBECTX_IGNORE_FZF:-} && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then - choose_namespace_interactive - else - list_namespaces - fi - elif [[ "$#" -eq 1 ]]; then - if [[ "${1}" == '-h' || "${1}" == '--help' ]]; then - usage - elif [[ "${1}" == "-" ]]; then - swap_namespace - elif [[ "${1}" =~ ^-(.*) ]]; then - echo "error: unrecognized flag \"${1}\"" >&2 - usage - exit 1 - elif [[ "${1}" =~ (.+)=(.+) ]]; then - alias_context "${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}" - else - set_namespace "${1}" - fi - else - echo "error: too many flags" >&2 - usage - exit 1 - fi -} - -main "$@" diff --git a/bin/kubernetes.setup.bash b/bin/kubernetes.setup.bash index 78ef1b1..5e9d246 100644 --- a/bin/kubernetes.setup.bash +++ b/bin/kubernetes.setup.bash @@ -1,9 +1,3 @@ -export MINIKUBE_WANTUPDATENOTIFICATION=true -export MINIKUBE_WANTREPORTERRORPROMPT=false -export MINIKUBE_WANTKUBECTLDOWNLOADMSG=false -export MINIKUBE_HOME=$HOME -export MINIKUBE_DRIVER=kvm2 -export CHANGE_MINIKUBE_NONE_USER=true test -d $HOME/.kube || mkdir $HOME/.kube test -f $HOME/.kube/config || touch $HOME/.kube/config export KUBECONFIG=$HOME/.kube/config diff --git a/bin/minikube.completion.bash b/bin/minikube.completion.bash deleted file mode 100644 index 30aa087..0000000 --- a/bin/minikube.completion.bash +++ /dev/null @@ -1,1493 +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. -# bash completion for minikube -*- shell-script -*- - -__minikube_debug() -{ - if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then - echo "$*" >> "${BASH_COMP_DEBUG_FILE}" - fi -} - -# Homebrew on Macs have version 1.3 of bash-completion which doesn't include -# _init_completion. This is a very minimal version of that function. -__minikube_init_completion() -{ - COMPREPLY=() - _get_comp_words_by_ref "$@" cur prev words cword -} - -__minikube_index_of_word() -{ - local w word=$1 - shift - index=0 - for w in "$@"; do - [[ $w = "$word" ]] && return - index=$((index+1)) - done - index=-1 -} - -__minikube_contains_word() -{ - local w word=$1; shift - for w in "$@"; do - [[ $w = "$word" ]] && return - done - return 1 -} - -__minikube_handle_reply() -{ - __minikube_debug "${FUNCNAME[0]}" - case $cur in - -*) - if [[ $(type -t compopt) = "builtin" ]]; then - compopt -o nospace - fi - local allflags - if [ ${#must_have_one_flag[@]} -ne 0 ]; then - allflags=("${must_have_one_flag[@]}") - else - allflags=("${flags[*]} ${two_word_flags[*]}") - fi - COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") ) - if [[ $(type -t compopt) = "builtin" ]]; then - [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace - fi - - # complete after --flag=abc - if [[ $cur == *=* ]]; then - if [[ $(type -t compopt) = "builtin" ]]; then - compopt +o nospace - fi - - local index flag - flag="${cur%=*}" - __minikube_index_of_word "${flag}" "${flags_with_completion[@]}" - COMPREPLY=() - if [[ ${index} -ge 0 ]]; then - PREFIX="" - cur="${cur#*=}" - ${flags_completion[${index}]} - if [ -n "${ZSH_VERSION}" ]; then - # zsh completion needs --flag= prefix - eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )" - fi - fi - fi - return 0; - ;; - esac - - # check if we are handling a flag with special work handling - local index - __minikube_index_of_word "${prev}" "${flags_with_completion[@]}" - if [[ ${index} -ge 0 ]]; then - ${flags_completion[${index}]} - return - fi - - # we are parsing a flag and don't have a special handler, no completion - if [[ ${cur} != "${words[cword]}" ]]; then - return - fi - - local completions - completions=("${commands[@]}") - if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then - completions=("${must_have_one_noun[@]}") - fi - if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then - completions+=("${must_have_one_flag[@]}") - fi - COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") ) - - if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") ) - fi - - if [[ ${#COMPREPLY[@]} -eq 0 ]]; then - declare -F __custom_func >/dev/null && __custom_func - fi - - # available in bash-completion >= 2, not always present on macOS - if declare -F __ltrim_colon_completions >/dev/null; then - __ltrim_colon_completions "$cur" - fi - - # If there is only 1 completion and it is a flag with an = it will be completed - # but we don't want a space after the = - if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then - compopt -o nospace - fi -} - -# The arguments should be in the form "ext1|ext2|extn" -__minikube_handle_filename_extension_flag() -{ - local ext="$1" - _filedir "@(${ext})" -} - -__minikube_handle_subdirs_in_dir_flag() -{ - local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 -} - -__minikube_handle_flag() -{ - __minikube_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - # if a command required a flag, and we found it, unset must_have_one_flag() - local flagname=${words[c]} - local flagvalue - # if the word contained an = - if [[ ${words[c]} == *"="* ]]; then - flagvalue=${flagname#*=} # take in as flagvalue after the = - flagname=${flagname%=*} # strip everything after the = - flagname="${flagname}=" # but put the = back - fi - __minikube_debug "${FUNCNAME[0]}: looking for ${flagname}" - if __minikube_contains_word "${flagname}" "${must_have_one_flag[@]}"; then - must_have_one_flag=() - fi - - # if you set a flag which only applies to this command, don't show subcommands - if __minikube_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then - commands=() - fi - - # keep flag value with flagname as flaghash - # flaghash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then - if [ -n "${flagvalue}" ] ; then - flaghash[${flagname}]=${flagvalue} - elif [ -n "${words[ $((c+1)) ]}" ] ; then - flaghash[${flagname}]=${words[ $((c+1)) ]} - else - flaghash[${flagname}]="true" # pad "true" for bool flag - fi - fi - - # skip the argument to a two word flag - if __minikube_contains_word "${words[c]}" "${two_word_flags[@]}"; then - c=$((c+1)) - # if we are looking for a flags value, don't show commands - if [[ $c -eq $cword ]]; then - commands=() - fi - fi - - c=$((c+1)) - -} - -__minikube_handle_noun() -{ - __minikube_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - if __minikube_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then - must_have_one_noun=() - elif __minikube_contains_word "${words[c]}" "${noun_aliases[@]}"; then - must_have_one_noun=() - fi - - nouns+=("${words[c]}") - c=$((c+1)) -} - -__minikube_handle_command() -{ - __minikube_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - - local next_command - if [[ -n ${last_command} ]]; then - next_command="_${last_command}_${words[c]//:/__}" - else - if [[ $c -eq 0 ]]; then - next_command="_minikube_root_command" - else - next_command="_${words[c]//:/__}" - fi - fi - c=$((c+1)) - __minikube_debug "${FUNCNAME[0]}: looking for ${next_command}" - declare -F "$next_command" >/dev/null && $next_command -} - -__minikube_handle_word() -{ - if [[ $c -ge $cword ]]; then - __minikube_handle_reply - return - fi - __minikube_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" - if [[ "${words[c]}" == -* ]]; then - __minikube_handle_flag - elif __minikube_contains_word "${words[c]}" "${commands[@]}"; then - __minikube_handle_command - elif [[ $c -eq 0 ]]; then - __minikube_handle_command - else - __minikube_handle_noun - fi - __minikube_handle_word -} - -_minikube_addons_configure() -{ - last_command="minikube_addons_configure" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_addons_disable() -{ - last_command="minikube_addons_disable" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_addons_enable() -{ - last_command="minikube_addons_enable" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_addons_list() -{ - last_command="minikube_addons_list" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_addons_open() -{ - last_command="minikube_addons_open" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - flags+=("--https") - local_nonpersistent_flags+=("--https") - flags+=("--interval=") - local_nonpersistent_flags+=("--interval=") - flags+=("--url") - local_nonpersistent_flags+=("--url") - flags+=("--wait=") - local_nonpersistent_flags+=("--wait=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_addons() -{ - last_command="minikube_addons" - commands=() - commands+=("configure") - commands+=("disable") - commands+=("enable") - commands+=("list") - commands+=("open") - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - local_nonpersistent_flags+=("--format=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_cache_add() -{ - last_command="minikube_cache_add" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_cache_delete() -{ - last_command="minikube_cache_delete" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_cache_list() -{ - last_command="minikube_cache_list" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - local_nonpersistent_flags+=("--format=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_cache() -{ - last_command="minikube_cache" - commands=() - commands+=("add") - commands+=("delete") - commands+=("list") - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_completion() -{ - last_command="minikube_completion" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--help") - flags+=("-h") - local_nonpersistent_flags+=("--help") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_config_get() -{ - last_command="minikube_config_get" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_config_set() -{ - last_command="minikube_config_set" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_config_unset() -{ - last_command="minikube_config_unset" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_config_view() -{ - last_command="minikube_config_view" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - local_nonpersistent_flags+=("--format=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_config() -{ - last_command="minikube_config" - commands=() - commands+=("get") - commands+=("set") - commands+=("unset") - commands+=("view") - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_dashboard() -{ - last_command="minikube_dashboard" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--url") - local_nonpersistent_flags+=("--url") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_delete() -{ - last_command="minikube_delete" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_docker-env() -{ - last_command="minikube_docker-env" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--no-proxy") - local_nonpersistent_flags+=("--no-proxy") - flags+=("--shell=") - local_nonpersistent_flags+=("--shell=") - flags+=("--unset") - flags+=("-u") - local_nonpersistent_flags+=("--unset") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_get-k8s-versions() -{ - last_command="minikube_get-k8s-versions" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_ip() -{ - last_command="minikube_ip" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_logs() -{ - last_command="minikube_logs" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--follow") - flags+=("-f") - local_nonpersistent_flags+=("--follow") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_mount() -{ - last_command="minikube_mount" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--9p-version=") - local_nonpersistent_flags+=("--9p-version=") - flags+=("--gid=") - local_nonpersistent_flags+=("--gid=") - flags+=("--ip=") - local_nonpersistent_flags+=("--ip=") - flags+=("--kill") - local_nonpersistent_flags+=("--kill") - flags+=("--msize=") - local_nonpersistent_flags+=("--msize=") - flags+=("--uid=") - local_nonpersistent_flags+=("--uid=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_profile() -{ - last_command="minikube_profile" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_service_list() -{ - last_command="minikube_service_list" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--namespace=") - two_word_flags+=("-n") - local_nonpersistent_flags+=("--namespace=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--format=") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_service() -{ - last_command="minikube_service" - commands=() - commands+=("list") - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - flags+=("--https") - local_nonpersistent_flags+=("--https") - flags+=("--interval=") - local_nonpersistent_flags+=("--interval=") - flags+=("--namespace=") - two_word_flags+=("-n") - local_nonpersistent_flags+=("--namespace=") - flags+=("--url") - local_nonpersistent_flags+=("--url") - flags+=("--wait=") - local_nonpersistent_flags+=("--wait=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_ssh() -{ - last_command="minikube_ssh" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_ssh-key() -{ - last_command="minikube_ssh-key" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_start() -{ - last_command="minikube_start" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--apiserver-ips=") - local_nonpersistent_flags+=("--apiserver-ips=") - flags+=("--apiserver-name=") - local_nonpersistent_flags+=("--apiserver-name=") - flags+=("--apiserver-names=") - local_nonpersistent_flags+=("--apiserver-names=") - flags+=("--cache-images") - local_nonpersistent_flags+=("--cache-images") - flags+=("--container-runtime=") - local_nonpersistent_flags+=("--container-runtime=") - flags+=("--cpus=") - local_nonpersistent_flags+=("--cpus=") - flags+=("--disable-driver-mounts") - local_nonpersistent_flags+=("--disable-driver-mounts") - flags+=("--disk-size=") - local_nonpersistent_flags+=("--disk-size=") - flags+=("--dns-domain=") - local_nonpersistent_flags+=("--dns-domain=") - flags+=("--docker-env=") - local_nonpersistent_flags+=("--docker-env=") - flags+=("--docker-opt=") - local_nonpersistent_flags+=("--docker-opt=") - flags+=("--extra-config=") - local_nonpersistent_flags+=("--extra-config=") - flags+=("--feature-gates=") - local_nonpersistent_flags+=("--feature-gates=") - flags+=("--gpu") - local_nonpersistent_flags+=("--gpu") - flags+=("--host-only-cidr=") - local_nonpersistent_flags+=("--host-only-cidr=") - flags+=("--hyperkit-vpnkit-sock=") - local_nonpersistent_flags+=("--hyperkit-vpnkit-sock=") - flags+=("--hyperkit-vsock-ports=") - local_nonpersistent_flags+=("--hyperkit-vsock-ports=") - flags+=("--hyperv-virtual-switch=") - local_nonpersistent_flags+=("--hyperv-virtual-switch=") - flags+=("--insecure-registry=") - local_nonpersistent_flags+=("--insecure-registry=") - flags+=("--iso-url=") - local_nonpersistent_flags+=("--iso-url=") - flags+=("--keep-context") - local_nonpersistent_flags+=("--keep-context") - flags+=("--kubernetes-version=") - local_nonpersistent_flags+=("--kubernetes-version=") - flags+=("--kvm-network=") - local_nonpersistent_flags+=("--kvm-network=") - flags+=("--memory=") - local_nonpersistent_flags+=("--memory=") - flags+=("--mount") - local_nonpersistent_flags+=("--mount") - flags+=("--mount-string=") - local_nonpersistent_flags+=("--mount-string=") - flags+=("--network-plugin=") - local_nonpersistent_flags+=("--network-plugin=") - flags+=("--nfs-share=") - local_nonpersistent_flags+=("--nfs-share=") - flags+=("--nfs-shares-root=") - local_nonpersistent_flags+=("--nfs-shares-root=") - flags+=("--registry-mirror=") - local_nonpersistent_flags+=("--registry-mirror=") - flags+=("--uuid=") - local_nonpersistent_flags+=("--uuid=") - flags+=("--vm-driver=") - local_nonpersistent_flags+=("--vm-driver=") - flags+=("--xhyve-disk-driver=") - local_nonpersistent_flags+=("--xhyve-disk-driver=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_status() -{ - last_command="minikube_status" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--format=") - local_nonpersistent_flags+=("--format=") - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_stop() -{ - last_command="minikube_stop" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_update-check() -{ - last_command="minikube_update-check" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_update-context() -{ - last_command="minikube_update-context" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_version() -{ - last_command="minikube_version" - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -_minikube_root_command() -{ - last_command="minikube" - commands=() - commands+=("addons") - commands+=("cache") - commands+=("completion") - commands+=("config") - commands+=("dashboard") - commands+=("delete") - commands+=("docker-env") - commands+=("get-k8s-versions") - commands+=("ip") - commands+=("logs") - commands+=("mount") - commands+=("profile") - commands+=("service") - commands+=("ssh") - commands+=("ssh-key") - commands+=("start") - commands+=("status") - commands+=("stop") - commands+=("update-check") - commands+=("update-context") - commands+=("version") - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--alsologtostderr") - flags+=("--bootstrapper=") - two_word_flags+=("-b") - flags+=("--log_backtrace_at=") - flags+=("--log_dir=") - flags+=("--loglevel=") - flags+=("--logtostderr") - flags+=("--profile=") - two_word_flags+=("-p") - flags+=("--stderrthreshold=") - flags+=("--v=") - two_word_flags+=("-v") - flags+=("--vmodule=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - -__start_minikube() -{ - local cur prev words cword - declare -A flaghash 2>/dev/null || : - if declare -F _init_completion >/dev/null 2>&1; then - _init_completion -s || return - else - __minikube_init_completion -n "=" || return - fi - - local c=0 - local flags=() - local two_word_flags=() - local local_nonpersistent_flags=() - local flags_with_completion=() - local flags_completion=() - local commands=("minikube") - local must_have_one_flag=() - local must_have_one_noun=() - local last_command - local nouns=() - - __minikube_handle_word -} - -if [[ $(type -t compopt) = "builtin" ]]; then - complete -o default -F __start_minikube minikube -else - complete -o default -o nospace -F __start_minikube minikube -fi - -# ex: ts=4 sw=4 et filetype=sh diff --git a/bin/minikube.setup.bash b/bin/minikube.setup.bash deleted file mode 100644 index b752442..0000000 --- a/bin/minikube.setup.bash +++ /dev/null @@ -1 +0,0 @@ -export MINIKUBE_MEMORY=4096 diff --git a/bin/rustup.completion.bash b/bin/rustup.completion.bash deleted file mode 100644 index bdb5601..0000000 --- a/bin/rustup.completion.bash +++ /dev/null @@ -1,1016 +0,0 @@ -_rustup() { - local i cur prev opts cmds - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - cmd="" - opts="" - - for i in ${COMP_WORDS[@]} - do - case "${i}" in - rustup) - cmd="rustup" - ;; - - active-toolchain) - cmd+="__active__toolchain" - ;; - add) - cmd+="__add" - ;; - analyze) - cmd+="__analyze" - ;; - completions) - cmd+="__completions" - ;; - component) - cmd+="__component" - ;; - default) - cmd+="__default" - ;; - default-host) - cmd+="__default__host" - ;; - disable) - cmd+="__disable" - ;; - doc) - cmd+="__doc" - ;; - docs) - cmd+="__docs" - ;; - enable) - cmd+="__enable" - ;; - help) - cmd+="__help" - ;; - install) - cmd+="__install" - ;; - link) - cmd+="__link" - ;; - list) - cmd+="__list" - ;; - man) - cmd+="__man" - ;; - override) - cmd+="__override" - ;; - remove) - cmd+="__remove" - ;; - run) - cmd+="__run" - ;; - self) - cmd+="__self" - ;; - set) - cmd+="__set" - ;; - show) - cmd+="__show" - ;; - target) - cmd+="__target" - ;; - telemetry) - cmd+="__telemetry" - ;; - toolchain) - cmd+="__toolchain" - ;; - uninstall) - cmd+="__uninstall" - ;; - unset) - cmd+="__unset" - ;; - update) - cmd+="__update" - ;; - upgrade-data) - cmd+="__upgrade__data" - ;; - which) - cmd+="__which" - ;; - *) - ;; - esac - done - - case "${cmd}" in - rustup) - opts=" -v -h -V --verbose --help --version show install uninstall update default toolchain target component override run which doc man self telemetry set completions help docs" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - - rustup__completions) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component) - opts=" -h -V --help --version list add remove help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__add) - opts=" -h -V --help --version --toolchain --target ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - --target) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__list) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__component__remove) - opts=" -h -V --help --version --toolchain --target ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - --target) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__default) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__doc) - opts=" -h -V --path --book --std --reference --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__docs) - opts=" -h -V --path --book --std --reference --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__install) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__man) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override) - opts=" -h -V --help --version list set unset help add remove" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__add) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__list) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__remove) - opts=" -h -V --nonexistent --help --version --path " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --path) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__set) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__override__unset) - opts=" -h -V --nonexistent --help --version --path " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --path) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__run) - opts=" -h -V --install --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self) - opts=" -h -V --help --version update uninstall upgrade-data help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__uninstall) - opts=" -y -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__update) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__self__upgrade__data) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set) - opts=" -h -V --help --version default-host help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set__default__host) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__set__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show) - opts=" -h -V --help --version active-toolchain help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show__active__toolchain) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__show__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target) - opts=" -h -V --help --version list add remove help install uninstall" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__add) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__install) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__list) - opts=" -h -V --help --version --toolchain " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__remove) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__target__uninstall) - opts=" -h -V --help --version --toolchain ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - --toolchain) - COMPREPLY=($(compgen -f ${cur})) - return 0 - ;; - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry) - opts=" -h -V --help --version enable disable analyze help" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__analyze) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__disable) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__enable) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__telemetry__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain) - opts=" -h -V --help --version list install uninstall link help update add remove" - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__add) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__help) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__install) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__link) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__list) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__remove) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__uninstall) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__toolchain__update) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__uninstall) - opts=" -h -V --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__update) - opts=" -h -V --no-self-update --force --help --version ... " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - rustup__which) - opts=" -h -V --help --version " - if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - case "${prev}" in - - *) - COMPREPLY=() - ;; - esac - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac -} - -complete -F _rustup -o bashdefault -o default rustup diff --git a/linux-bionic-playbook.yaml b/linux-bionic-playbook.yaml deleted file mode 100644 index d215ee1..0000000 --- a/linux-bionic-playbook.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: linux desktop setup - hosts: all - become: yes - become_user: root - become_method: sudo - gather_facts: False - vars: - ansible_connection: local - ansible_python_interpreter: /usr/bin/python3 - tasks: - - include_role: - name: dev-tools - - include_role: - name: docker - - include_role: - name: k8s - - include_role: - name: linux-desktop diff --git a/localdev-inventory.yaml b/localdev-inventory.yaml deleted file mode 100644 index 800dfc8..0000000 --- a/localdev-inventory.yaml +++ /dev/null @@ -1 +0,0 @@ -default ansible_connection=local diff --git a/roles/dev-tools/tasks/main.yml b/roles/dev-tools/tasks/main.yml deleted file mode 100644 index 969a2a4..0000000 --- a/roles/dev-tools/tasks/main.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -- name: install apt applications - apt: - name: jq,vim,emacs,curl,htop,tmux,git,openvpn,build-essential,libssl-dev,libncurses5-dev - state: present -- name: install micro - shell: curl -sLo /tmp/micro.tar.gz https://github.com/zyedidia/micro/releases/download/v1.4.1/micro-1.4.1-linux64.tar.gz && mkdir -p /tmp/micro && tar xzf /tmp/micro.tar.gz -C /tmp/micro && install -m 755 /tmp/micro/micro-1.4.1/micro /usr/local/bin/micro-1.4.1 && rm -rf /tmp/micro* && ln -sf /usr/local/bin/micro-1.4.1 /usr/local/bin/micro - args: - warn: False - creates: /usr/local/bin/micro-1.4.1 -- name: install powerline-go - shell: curl -sLo /tmp/powerline-go https://github.com/justjanne/powerline-go/releases/download/v1.12.1/powerline-go-linux-amd64 && install -m 755 /tmp/powerline-go /usr/local/bin/powerline-go-1.12.1 && rm -f /tmp/powerline-go && ln -sf /usr/local/bin/powerline-go-1.12.1 /usr/local/bin/powerline-go - args: - creates: /usr/local/bin/powerline-go-1.12.1 -- name: install rustup - become: no - shell: curl -o t.sh https://sh.rustup.rs -sSf && chmod 700 t.sh && ./t.sh --no-modify-path --verbose -y --default-toolchain stable && rm -f t.sh - args: - creates: ~/.cargo/bin/rustup -- name: install kerl - shell: curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl && install -m 755 kerl /usr/local/bin/kerl && rm -f kerl - args: - warn: False - creates: /usr/local/bin/kerl -- name: update kerl releases - become: no - shell: kerl update releases - args: - creates: ~/.kerl/otp_releases -- name: build erlang 21.0 - become: no - shell: kerl build 21.0 21.0 - args: - creates: ~/.kerl/builds/21.0 -- name: install erlang 21.0 - become: no - shell: kerl install 21.0 - args: - creates: ~/.kerl/installs/21.0 -- name: install kiex - become: no - shell: curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s - args: - warn: False - creates: ~/.kiex/bin/kiex -- name: install elixir - become: no - shell: . ~/bin/kerl.setup.bash && kiex install 1.7.4 - args: - creates: ~/.kiex/elixirs/elixir-1.7.4 diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml deleted file mode 100644 index 691c4c8..0000000 --- a/roles/docker/tasks/main.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: add docker-ce pubkey - shell: curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8" | sudo apt-key add - args: - warn: False -- name: add docker-ce repo - apt_repository: - repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" - state: present - update_cache: true -- name: install apt applications - apt: - name: libvirt-clients,libvirt-daemon-system,qemu-kvm,virt-manager,virt-top,virt-goodies,vagrant,vagrant-libvirt,vagrant-mutate,xsltproc,fop,docker-ce - state: present -- name: install docker-compose - shell: curl -sLo /tmp/docker-compose https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64 && install -m 755 /tmp/docker-compose /usr/local/bin/docker-compose-1.24.0 && rm -f /tmp/docker-compose && ln -sf /usr/local/bin/docker-compose-1.24.0 /usr/local/bin/docker-compose - args: - warn: False - creates: /usr/local/bin/docker-compose-1.24.0 -- name: install docker-machine - shell: curl -sLo docker-machine https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-linux-x86_64 && install -m 755 docker-machine /usr/local/bin/docker-machine-0.16.0 && rm -f docker-machine && ln -sf /usr/local/bin/docker-machine-0.16.0 /usr/local/bin/docker-machine - args: - warn: False - creates: /usr/local/bin/docker-machine-0.16.0 -- name: install docker-machine-driver-kvm2 - shell: curl -sLo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && install -m 755 docker-machine-driver-kvm2 /usr/local/bin/docker-machine-driver-kvm2 && rm -f docker-machine-driver-kvm2 - args: - warn: False - creates: /usr/local/bin/docker-machine-driver-kvm2 diff --git a/roles/k8s/tasks/main.yml b/roles/k8s/tasks/main.yml deleted file mode 100644 index d538674..0000000 --- a/roles/k8s/tasks/main.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -- name: configure static hostfile entry for starbase4.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.100 starbase4 starbase4.consolo.lan" -- name: configure static hostfile entry for errbit.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.136 errbit.consolo.lan" -- name: configure static hostfile entry for api-doc.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.100 api-docs.consolo.lan" -- name: configure static hostfile entry for lxd.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.253 lxd.consolo.lan mattermost.lxd.consolo.lan" -- name: configure static hostfile entry for git.lxd.consolo.lan - lineinfile: - path: /etc/hosts - line: "10.4.21.230 git.lxd.consolo.lan" -- name: install apt applications - apt: - name: python3-pip,python3-setuptools,python3-yaml,python3-wheel,socat,vpnc - state: present -- name: install pip applications - pip: - name: awscli,saws - state: present -- name: install kubectl - shell: curl -sLo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.11.3/bin/linux/amd64/kubectl && install -m 755 /tmp/kubectl /usr/local/bin/kubectl-1.11.3 && rm -f /tmp/kubectl && ln -sf /usr/local/bin/kubectl-1.11.3 /usr/local/bin/kubectl - args: - warn: False - creates: /usr/local/bin/kubectl-1.11.3 -- name: install kops - shell: curl -sLo /tmp/kops -L https://github.com/kubernetes/kops/releases/download/1.10.0/kops-linux-amd64 && install -m 755 /tmp/kops /usr/local/bin/kops-1.10.0 && rm -f /tmp/kops && ln -sf /usr/local/bin/kops-1.10.0 /usr/local/bin/kops - args: - warn: False - creates: /usr/local/bin/kops-1.10.0 -- name: install minikube - shell: curl -sLo /tmp/minikube https://storage.googleapis.com/minikube/releases/v1.1.1/minikube-linux-amd64 && install -m 755 /tmp/minikube /usr/local/bin/minikube-1.1.1 && rm -f /tmp/minikube && ln -sf /usr/local/bin/minikube-1.1.1 /usr/local/bin/minikube - args: - warn: False - creates: /usr/local/bin/minikube-1.1.1 -- name: install helm - shell: curl -sLo /tmp/helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz && mkdir -p /tmp/helm && tar xzf /tmp/helm.tar.gz -C /tmp/helm && install -m 755 /tmp/helm/linux-amd64/helm /usr/local/bin/helm-2.13.1 && rm -rf /tmp/helm* && ln -sf /usr/local/bin/helm-2.13.1 /usr/local/bin/helm - args: - creates: /usr/local/bin/helm-2.13.1 -- name: install k9s - shell: curl -sLo /tmp/k9s.tar.gz https://github.com/derailed/k9s/releases/download/0.6.7/k9s_0.6.7_Linux_x86_64.tar.gz && tar xzf /tmp/k9s.tar.gz -C /tmp && install -m 755 /tmp/k9s /usr/local/bin/k9s-0.6.7 && rm -f /tmp/k9s* && ln -sf /usr/local/bin/k9s-0.6.7 /usr/local/bin/k9s - args: - warn: False - creates: /usr/local/bin/k9s-0.6.7 -- name: install popeye - shell: curl -sLo /tmp/popeye.tar.gz https://github.com/derailed/popeye/releases/download/v0.3.6/popeye_0.3.6_Linux_x86_64.tar.gz && tar xzf /tmp/popeye.tar.gz -C /tmp && install -m 755 /tmp/popeye /usr/local/bin/popeye-0.3.6 && rm -f /tmp/popeye* && ln -sf /usr/local/bin/popeye-0.3.6 /usr/local/bin/popeye - args: - warn: False - creates: /usr/local/bin/popeye-0.3.6 -- name: install stern - shell: curl -sLo /tmp/stern_linux_amd64 https://github.com/wercker/stern/releases/download/1.10.0/stern_linux_amd64 && install -m 755 /tmp/stern_linux_amd64 /usr/local/bin/stern-1.10.0 && rm -f /tmp/stern_linux_amd64 && ln -sf /usr/local/bin/stern-1.10.0 /usr/local/bin/stern - args: - warn: False - creates: /usr/local/bin/stern-1.10.0 diff --git a/roles/linux-desktop/tasks/main.yml b/roles/linux-desktop/tasks/main.yml deleted file mode 100644 index 7c00021..0000000 --- a/roles/linux-desktop/tasks/main.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: add nextcloud pubkey - shell: curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x60EE47FBAD3DD469" | sudo apt-key add - args: - warn: False -- name: add nextcloud repo - apt_repository: - repo: "deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu bionic main" - state: present - update_cache: true -- name: add openrazer repo - apt_repository: - repo: "deb http://ppa.launchpad.net/openrazer/stable/ubuntu bionic main" - state: present - update_cache: true -- name: add polychromatic repo - apt_repository: - repo: "deb http://ppa.launchpad.net/openrazer/stable/ubuntu bionic main" - state: present - update_cache: true -- name: install apt applications - apt: - name: openvpn,nextcloud-client,openrazer-meta,polychromatic - state: present -- name: install kitty terminal emulator - become: no - shell: curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin launch=n && ln -s ~/.local/kitty.app/bin/kitty ~/bin/ && mkdir -p ~/.local/share/applications && cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications && sed -i "s/Icon\=kitty/Icon\=\/home\/$USER\/.local\/kitty.app\/share\/icons\/hicolor\/256x256\/apps\/kitty.png/g" ~/.local/share/applications/kitty.desktop - args: - warn: False - creates: ~/bin/kitty