diff options
| -rw-r--r-- | .bashrc | 1 | ||||
| -rw-r--r-- | .fvwm2rc | 2 | ||||
| -rw-r--r-- | .local/share/bash-completion/completions/cargo | 3 | ||||
| -rw-r--r-- | .local/share/bash-completion/completions/rustup | 1146 | ||||
| -rw-r--r-- | .profile | 2 | ||||
| -rwxr-xr-x | .vim/pack/mvertes/install.sh | 2 | ||||
| -rw-r--r-- | .vimrc | 8 | ||||
| -rwxr-xr-x | bin/lt | 15 |
8 files changed, 1169 insertions, 10 deletions
@@ -67,6 +67,7 @@ alias gtr='go test -v -run' alias gtb='go test -v -cpuprofile cpu.out -memprofile mem.out -benchmem -bench' alias kd='sudo cat /sys/kernel/debug/tracing/trace_pipe' +alias tree='p tree -C' alias rvi='sudo vim' alias rxt='sudo xt' alias rxvi='sudo xvi' @@ -111,9 +111,9 @@ DestroyMenu "Settings" AddToMenu "Settings" + "&Display" Exec exec arandr #+ "&Keyboard" Exec exec setxkbmap fr ++ "&Network" Exec exec nm-connection-editor + "&Power" Exec exec xt -e sudo powertop + "&Sound" Exec exec pavucontrol -+ "&Wifi" Exec exec wpa_gui -i wlan0 DestroyMenu "Multimedia" AddToMenu "Multimedia" diff --git a/.local/share/bash-completion/completions/cargo b/.local/share/bash-completion/completions/cargo new file mode 100644 index 0000000..b410351 --- /dev/null +++ b/.local/share/bash-completion/completions/cargo @@ -0,0 +1,3 @@ +if command -v rustc >/dev/null 2>&1; then + source "$(rustc --print sysroot)"/etc/bash_completion.d/cargo +fi diff --git a/.local/share/bash-completion/completions/rustup b/.local/share/bash-completion/completions/rustup new file mode 100644 index 0000000..68153cd --- /dev/null +++ b/.local/share/bash-completion/completions/rustup @@ -0,0 +1,1146 @@ +_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" + ;; + auto-self-update) + cmd+="__auto__self__update" + ;; + check) + cmd+="__check" + ;; + completions) + cmd+="__completions" + ;; + component) + cmd+="__component" + ;; + default) + cmd+="__default" + ;; + default-host) + cmd+="__default__host" + ;; + doc) + cmd+="__doc" + ;; + docs) + cmd+="__docs" + ;; + dump-testament) + cmd+="__dump__testament" + ;; + help) + cmd+="__help" + ;; + home) + cmd+="__home" + ;; + install) + cmd+="__install" + ;; + keys) + cmd+="__keys" + ;; + link) + cmd+="__link" + ;; + list) + cmd+="__list" + ;; + man) + cmd+="__man" + ;; + override) + cmd+="__override" + ;; + profile) + cmd+="__profile" + ;; + remove) + cmd+="__remove" + ;; + run) + cmd+="__run" + ;; + self) + cmd+="__self" + ;; + set) + cmd+="__set" + ;; + show) + cmd+="__show" + ;; + target) + cmd+="__target" + ;; + toolchain) + cmd+="__toolchain" + ;; + uninstall) + cmd+="__uninstall" + ;; + unset) + cmd+="__unset" + ;; + update) + cmd+="__update" + ;; + upgrade) + cmd+="__upgrade" + ;; + upgrade-data) + cmd+="__upgrade__data" + ;; + which) + cmd+="__which" + ;; + *) + ;; + esac + done + + case "${cmd}" in + rustup) + opts=" -v -q -h -V --verbose --quiet --help --version <+toolchain> dump-testament show install uninstall update check default toolchain target component override run which doc man self set completions help upgrade 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__check) + 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__completions) + opts=" -h -V --help --version <shell> <command> " + 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 <component>... " + 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 --installed --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 <component>... " + 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 <toolchain> " + 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 --alloc --book --cargo --core --edition-guide --nomicon --proc_macro --reference --rust-by-example --rustc --rustdoc --std --test --unstable-book --embedded-book --help --version --toolchain <topic> " + 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 --alloc --book --cargo --core --edition-guide --nomicon --proc_macro --reference --rust-by-example --rustc --rustdoc --std --test --unstable-book --embedded-book --help --version --toolchain <topic> " + 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__dump__testament) + 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__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 --no-self-update --force --force-non-host --help --version --profile <toolchain>... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --profile) + COMPREPLY=($(compgen -W "minimal default complete" -- "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + rustup__man) + opts=" -h -V --help --version --toolchain <command> " + 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 --path <toolchain> " + 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__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 --path <toolchain> " + 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__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 <toolchain> <command>... " + 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 profile auto-self-update 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__auto__self__update) + opts=" -h -V --help --version <auto-self-update-mode> " + 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__default__host) + opts=" -h -V --help --version <host_triple> " + 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__set__profile) + opts=" -h -V --help --version <profile-name> " + 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=" -v -h -V --verbose --help --version active-toolchain home profile keys 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=" -v -h -V --verbose --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__show__home) + 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__keys) + 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__profile) + 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 <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 + ;; + *) + 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 <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 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + rustup__target__list) + opts=" -h -V --installed --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 <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 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + rustup__target__uninstall) + 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 + ;; + *) + 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 -c -t --no-self-update --force --allow-downgrade --force-non-host --help --version --profile --component --target <toolchain>... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --profile) + COMPREPLY=($(compgen -W "minimal default complete" -- "${cur}")) + return 0 + ;; + --component) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --target) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + 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 -c -t --no-self-update --force --allow-downgrade --force-non-host --help --version --profile --component --target <toolchain>... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --profile) + COMPREPLY=($(compgen -W "minimal default complete" -- "${cur}")) + return 0 + ;; + --component) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --target) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + rustup__toolchain__link) + opts=" -h -V --help --version <toolchain> <path> " + 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=" -v -h -V --verbose --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 <toolchain>... " + 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 <toolchain>... " + 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 -c -t --no-self-update --force --allow-downgrade --force-non-host --help --version --profile --component --target <toolchain>... " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + --profile) + COMPREPLY=($(compgen -W "minimal default complete" -- "${cur}")) + return 0 + ;; + --component) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --target) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -t) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + rustup__uninstall) + opts=" -h -V --help --version <toolchain>... " + 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 --force-non-host --help --version <toolchain>... " + 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__upgrade) + opts=" -h -V --no-self-update --force --force-non-host --help --version <toolchain>... " + 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 --toolchain <command> " + 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 + ;; + esac +} + +complete -F _rustup -o bashdefault -o default rustup @@ -1,6 +1,6 @@ # ~/.profile -PATH=~/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH:~/go/bin +PATH=~/bin:/usr/local/sbin:/usr/sbin:/sbin:~/.cargo/bin:$PATH:~/go/bin [ "${SHELL##*/}" = bash ] && . ~/.bashrc diff --git a/.vim/pack/mvertes/install.sh b/.vim/pack/mvertes/install.sh index 90cd4b3..54cf720 100755 --- a/.vim/pack/mvertes/install.sh +++ b/.vim/pack/mvertes/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh plugins=' git@github.com:mvertes/vimki @@ -12,10 +12,12 @@ filetype plugin on filetype plugin indent on let mapleader = "," -" Save all undo and swapfiles at the same place -set directory^=$HOME/.vim/swap// -set undodir=$HOME/.vim/undo// +" Save all files at the same place +set backupdir=~/.vim/backup// +set directory=~/.vim/backup// +set undodir=~/.vim/backup// set undofile +set backup "set rtp+=/opt/homebrew/opt/fzf let g:fzf_preview = 'cat {}' @@ -2,7 +2,7 @@ # link tree -lt_version='lt-0.1' +lt_version='lt-0.2' unset CDPATH export LC_ALL=C IFS=' ' @@ -15,7 +15,8 @@ Usage: Options: -V print version and exit - -n print actions but not execute" + -n print actions but not execute + -u unlink" } # ca returns the common ancestor between 2 paths @@ -65,14 +66,20 @@ lt() { done f=${f#./}; fd=$d/$f; fd=${fd%/*} test -d "$fd" || $trace mkdir -p "$fd" - rp "$s/$f" "$d/$f" && $trace ln -sf "$R1" "$d/$f" + if [ "$unlink" ]; then + ! [ -L "$d/$f" ] && echo "not a symlink: $d/$f" >&2 && continue + $trace rm "$d/$f" + else + rp "$s/$f" "$d/$f" && $trace ln -sf "$R1" "$d/$f" + fi done } } -while getopts :nvV opt; do +while getopts :nuvV opt; do case $opt in (n) trace='echo' ;; + (u) unlink=1 ;; (V) echo "$lt_version"; exit ;; (*) help; exit 1;; esac |
