mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 20:40:32 +01:00
Compare commits
36 Commits
da12a7d43f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c5ecd6c98d | |||
| a939dfe553 | |||
| 47436ddc59 | |||
| 4bd7364423 | |||
| 7b2830d0f9 | |||
| 94a179c162 | |||
| 9b03c61bf2 | |||
| 97e6e79755 | |||
| 515f854701 | |||
| c71460b481 | |||
| 804d6dab3c | |||
| 44cf9ba4b7 | |||
| 671fa71ae3 | |||
| d43495f5e8 | |||
| 00f39b4fad | |||
| 5dbac71442 | |||
| 4829a72892 | |||
| 33f24fe6de | |||
| 3ee484c706 | |||
| a45519b90e | |||
| 4865d8f724 | |||
| 73b9d8f001 | |||
| 8f0fa8da4d | |||
| 7d8afc4f05 | |||
| 4d2a907c05 | |||
| 565df72597 | |||
| 59db612d3a | |||
| 3304a568bf | |||
| 4d37421da4 | |||
| 00c06d33bf | |||
| bc6e28ec11 | |||
| ccaff56e93 | |||
| 45b1a34b18 | |||
| d428751e5d | |||
| 3769dadebc | |||
| 571318a6e1 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,5 +7,4 @@ vim/.vim/.netrwhist
|
||||
zsh/.config/zsh/.chpwd-recent-dirs
|
||||
|
||||
# Ignore the installation of services for now.
|
||||
systemd/.config/systemd/user/default.target.wants
|
||||
systemd/.config/systemd/user/timers.target.wants
|
||||
systemd/.config/systemd/user/*.target.wants
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -61,3 +61,6 @@
|
||||
[submodule "zsh/.config/zsh/plugins/zsh-auto-notify"]
|
||||
path = zsh/.config/zsh/plugins/zsh-auto-notify
|
||||
url = https://github.com/MichaelAquilina/zsh-auto-notify.git
|
||||
[submodule "vim/.vim/pack/bundle/start/vim-pkgbuild"]
|
||||
path = vim/.vim/pack/bundle/start/vim-pkgbuild
|
||||
url = https://github.com/m-pilia/vim-pkgbuild.git
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
autoSetupRemote = true
|
||||
followTags = true
|
||||
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = zdiff3
|
||||
|
||||
[help]
|
||||
autocorrect = 10
|
||||
@@ -41,12 +44,47 @@
|
||||
pushf = push --force-with-lease
|
||||
fixup = commit --fixup=@
|
||||
master = !git fetch && git checkout -B master origin/master
|
||||
del = branch -D
|
||||
|
||||
[rebase]
|
||||
autosquash = true
|
||||
updaterefs = true
|
||||
autoStash = true
|
||||
|
||||
[fetch]
|
||||
prune = true
|
||||
pruneTags = true
|
||||
all = true
|
||||
|
||||
[sendemail]
|
||||
smtpserver = charon.bertptrs.nl
|
||||
smtpserverport = 587
|
||||
smtpuser = bert
|
||||
smtpencryption = tls
|
||||
|
||||
[blame]
|
||||
# Ignore certain commits while generating "git blame." Filename taken from
|
||||
# Github's pseudo-standard
|
||||
#
|
||||
# 2023-01-26: Enabling this by default causes blame to fail in all repos
|
||||
# that do not have it. Not desirable behaviour. Should be manually enabled
|
||||
# per-repo.
|
||||
#
|
||||
# ignoreRevsFile = .git-blame-ignore-revs Mark any lines that have had a
|
||||
# commit skipped using --ignore-rev with a `?`
|
||||
markIgnoredLines = true
|
||||
# Mark any lines that were added in a skipped commit and can not be
|
||||
# attributed with a `*`
|
||||
markUnblamableLines = true
|
||||
[branch]
|
||||
sort = -committerdate
|
||||
[diff]
|
||||
algorithm = histogram
|
||||
colorMoved = plain
|
||||
mnemonicprefix = true
|
||||
renames = true
|
||||
[rerere]
|
||||
enabled = true
|
||||
autoupdate = true
|
||||
[tag]
|
||||
sort = version:refname
|
||||
|
||||
@@ -18,3 +18,4 @@
|
||||
# Exclude IDE files
|
||||
.idea
|
||||
cmake-build-*
|
||||
.vscode
|
||||
|
||||
@@ -14,3 +14,6 @@ gsettings set org.gnome.desktop.wm.keybindings begin-move "['']"
|
||||
|
||||
# No F1 button in Gnome Terminal
|
||||
gsettings set "org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/" help 'disabled'
|
||||
|
||||
# No emoji ibus hotkey
|
||||
gsettings set org.freedesktop.ibus.panel.emoji hotkey "[]"
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
#!/hint/bash
|
||||
# Modify default build parameters to build native optimizations
|
||||
CFLAGS="${CFLAGS/-mtune=generic/-mtune=native}"
|
||||
CXXFLAGS="${CXXFLAGS/-mtune=generic/-mtune=native}"
|
||||
|
||||
# Enable rust to do the same
|
||||
export RUSTFLAGS="-C target_cpu=native"
|
||||
PACKAGER="Bert Peters <bertptrs@archlinux.org>"
|
||||
GPGKEY="0x38100C24376CD5F6ED4FF4B46918400C2703040C"
|
||||
|
||||
# Do a parallel build and enable output combining
|
||||
MAKEFLAGS="-j$(nproc) -Otarget"
|
||||
MAKEFLAGS="-j$(nproc) -Otarget -k"
|
||||
|
||||
# Use parallel compression
|
||||
COMPRESSXZ=(nice xz -c -z -T 0 -)
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
---
|
||||
BUNDLE_PATH: "~/.gem"
|
||||
BUNDLE_AUTO_INSTALL: "true"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Clean up locally built pikaur packages
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/paccache -c %h/.cache/pikaur/pkg -r --nocolor -v
|
||||
ExecStart=/usr/bin/paccache -c %h/.cache/pikaur/pkg -r --nocolor -v -u -k0
|
||||
ExecStart=/usr/bin/paccache -c %h/.cache/pacman/pkgs -r --nocolor -v
|
||||
ExecStart=/usr/bin/paccache -c %h/.cache/pacman/pkgs -r --nocolor -v -u -k0
|
||||
@@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Periodically clean pikaur pkgs
|
||||
|
||||
[Timer]
|
||||
Persistent=True
|
||||
OnCalendar=weekly
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Cleanup of temporary files
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/systemd-tmpfiles --root=%h --clean %h/.config/tmpfiles/tmpfiles.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -1,5 +0,0 @@
|
||||
#Type Path Mode UID GID Age Argument
|
||||
e /.cache/spotify - - - 30d -
|
||||
e /.cache/chromium - - - 30d -
|
||||
e /.cache/mozilla - - - 30d -
|
||||
e /Downloads - - - 7d -
|
||||
6
systemd/.config/user-tmpfiles.d/tmpfiles.conf
Normal file
6
systemd/.config/user-tmpfiles.d/tmpfiles.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
#Type Path Mode UID GID Age Argument
|
||||
e %C/spotify - - - 30d -
|
||||
e %C/chromium - - - 30d -
|
||||
e %C/mozilla - - - 30d -
|
||||
e %C/pacman - - - 30d -
|
||||
e %h/Downloads - - - 7d -
|
||||
1
vim/.vim/pack/bundle/start/vim-pkgbuild
Submodule
1
vim/.vim/pack/bundle/start/vim-pkgbuild
Submodule
Submodule vim/.vim/pack/bundle/start/vim-pkgbuild added at 5fc4106609
@@ -47,10 +47,14 @@ fun! StripTrailingWhitespace()
|
||||
if &ft =~ 'diff'
|
||||
return
|
||||
endif
|
||||
if expand("%:e") == 't'
|
||||
return
|
||||
endif
|
||||
%s/\s\+$//e
|
||||
endfun
|
||||
|
||||
autocmd BufWritePre * call StripTrailingWhitespace()
|
||||
autocmd filetype pkgbuild setlocal tabstop=2 shiftwidth=2 expandtab
|
||||
|
||||
" Keep backup files etc out of the way
|
||||
set undofile
|
||||
|
||||
@@ -38,9 +38,6 @@ fi
|
||||
# Set up wine
|
||||
export WINEPREFIX="$XDG_DATA_HOME/wine"
|
||||
|
||||
# Setup tmux
|
||||
test -f "$XDG_CONFIG_HOME/tmux/tmux.conf" && alias tmux="tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
|
||||
# Set up Rubygems
|
||||
if type gem &> /dev/null; then
|
||||
path+="$HOME/.gem/bin"
|
||||
|
||||
@@ -22,8 +22,12 @@ fi
|
||||
unset -f want_multiplexer
|
||||
|
||||
# Check for service-managed keyring
|
||||
if [[ -z $SSH_AUTH_SOCK ]] && [[ -S $XDG_RUNTIME_DIR/ssh-agent.socket ]]; then
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
if [[ -z $SSH_AUTH_SOCK ]]; then
|
||||
if [[ -S $XDG_RUNTIME_DIR/ssh-agent.socket ]]; then
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
elif [[ -S $XDG_RUNTIME_DIR/gcr/ssh ]]; then
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
fi
|
||||
fi
|
||||
|
||||
#######################
|
||||
@@ -46,7 +50,6 @@ plugins=(
|
||||
zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
zsh-you-should-use/you-should-use.plugin.zsh
|
||||
nix-zsh-completions/nix-zsh-completions.plugin.zsh
|
||||
zsh-auto-notify/auto-notify.plugin.zsh
|
||||
)
|
||||
|
||||
for plugin in "${plugins[@]}"; do
|
||||
@@ -57,20 +60,6 @@ done
|
||||
|
||||
fpath+=("$ZDOTDIR/plugins/nix-zsh-completions")
|
||||
|
||||
# Configure auto-notify
|
||||
AUTO_NOTIFY_IGNORE+=(
|
||||
"gcloud compute ssh"
|
||||
"nix run"
|
||||
"git"
|
||||
"bash"
|
||||
"sem debug"
|
||||
"git log"
|
||||
"journalctl"
|
||||
"jekyll serve"
|
||||
"sudoedit"
|
||||
)
|
||||
|
||||
|
||||
## Autosuggest plugin configuration
|
||||
# Consider autocomplete in completion
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
@@ -91,20 +80,32 @@ alias :q='exit'
|
||||
alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
|
||||
alias makej="make -j$(nproc)"
|
||||
alias sdc='sudo docker-compose'
|
||||
alias nrc='nix run -c'
|
||||
alias gcs='gcloud compute ssh'
|
||||
alias gscp='gcloud compute scp'
|
||||
# Used to be nix run -c. That no longer works but my muscle memory does
|
||||
alias nrc='nix shell --file default.nix -c'
|
||||
alias gcs='gcloud compute ssh --tunnel-through-iap'
|
||||
alias gscp='gcloud compute scp --tunnel-through-iap'
|
||||
alias gci='gcloud compute instances'
|
||||
# This invocation is so much more complicated than it needs to be, but
|
||||
# Google will only show mountain time otherwise.
|
||||
alias gops='gcloud compute operations list --format=":(TIMESTAMP.date(tz=LOCAL))" --sort-by=TIMESTAMP'
|
||||
|
||||
# Not an alias but useful nonetheless.
|
||||
function pasters() {
|
||||
local file=${1:-/dev/stdin}
|
||||
curl --data-binary @${file} https://paste.rs
|
||||
# Explicitly write the newline because paste.rs doesn't and sakura
|
||||
# gets confused.
|
||||
curl --write-out "\n" --data-binary @${file} https://paste.rs
|
||||
}
|
||||
|
||||
# Ensure we can make cheap copies on btrfs
|
||||
alias cp='cp --reflink=auto'
|
||||
|
||||
function pullall() {
|
||||
for repo in "$@"; do
|
||||
echo "$repo"
|
||||
done | xargs -P0 -I{} git -C {} pull
|
||||
}
|
||||
|
||||
if (( $+commands[thefuck] ))
|
||||
then
|
||||
alias fuck='$(thefuck $(fc -ln -1))'
|
||||
@@ -114,6 +115,11 @@ eval "$(dircolors)"
|
||||
|
||||
# Initialize the prompt
|
||||
source "${ZDOTDIR:-$HOME}/.zshtheme"
|
||||
# Report commands that take longer than ten seconds, or more than 10MB
|
||||
# of RAM
|
||||
REPORTTIME=10
|
||||
REPORTMEMORY=10240
|
||||
TIMEFMT='%J %U user %S system %P cpu %*E total; max RSS %MkB'
|
||||
|
||||
# Setup the CNF hook
|
||||
if [[ -s /usr/share/doc/pkgfile/command-not-found.zsh ]]; then
|
||||
@@ -289,29 +295,40 @@ if (( $+commands[bat] )); then
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
# And replace cat while we're at it
|
||||
alias cat='bat'
|
||||
|
||||
# According to upstream, "if you have problems add this." I have problems.
|
||||
export MANROFFOPT="-c"
|
||||
fi
|
||||
|
||||
############################
|
||||
# Special SSH key handling #
|
||||
############################
|
||||
# Source Nix if it's installed. Should be done by the WM, but it isn't
|
||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
fi
|
||||
|
||||
if [[ -f ~/.ssh/id_ed25519 ]]; then
|
||||
# gnome-keyring doesn't handle ed25519 keys properly; try setting up an alternative agent.
|
||||
export SSH_ENV="$HOME/.ssh/environment"
|
||||
#####################
|
||||
# Arch Linux things #
|
||||
#####################
|
||||
function arch-pkg-cd() {
|
||||
# Inspired by Segaja: https://gitlab.com/Segaja/dotfiles_base/-/blob/main/distro_arch/.config/zsh/os.zsh#L118-133
|
||||
local arch_repo_folder="${HOME}/projects/arch/packaging/packages"
|
||||
|
||||
start_agent() {
|
||||
echo "Initialising new SSH agent..."
|
||||
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
|
||||
echo Succeeded
|
||||
chmod 600 "${SSH_ENV}"
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
/usr/bin/ssh-add ~/.ssh/google_compute_engine >/dev/null 2>&1
|
||||
}
|
||||
if [[ ! -d "$arch_repo_folder/$1" ]]; then
|
||||
if pacman -Si "$1" &> /dev/null; then
|
||||
cd "$arch_repo_folder"
|
||||
pkgctl repo clone "$1"
|
||||
elif [[ "$2" = '-c' ]]; then
|
||||
cd "$arch_repo_folder"
|
||||
pkgctl repo create --clone "$1"
|
||||
else
|
||||
echo "Non-existent package, use -c to create" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -f "${SSH_ENV}" ]; then
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
kill -0 "$SSH_AGENT_PID" 2>/dev/null || { start_agent; }
|
||||
cd "$1"
|
||||
return 0
|
||||
else
|
||||
start_agent
|
||||
cd "$arch_repo_folder/$1"
|
||||
pkgctl repo configure
|
||||
git pull --rebase --autostash
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ function prompt_ps1() {
|
||||
host="%S%B$host"
|
||||
fi
|
||||
|
||||
local shlvl="%{$fg[black]%}%{$bg[magenta]%}\${(l:$SHLVL-1::>:)}%{$reset_color%}"
|
||||
local prompt="%n@%{$fg[cyan]%}%m$rs %# "
|
||||
ps1=(
|
||||
"$host"
|
||||
@@ -61,6 +62,7 @@ function prompt_ps1() {
|
||||
$'\n'
|
||||
'$(prompt_handle_virtualenv)'
|
||||
'${vcs_info_msg_0_:+${vcs_info_msg_0_}\n}'
|
||||
"$shlvl"
|
||||
"$prompt"
|
||||
)
|
||||
echo "${(j::)ps1}"
|
||||
|
||||
134
zsh/.config/zsh/completions/_bundle
Normal file
134
zsh/.config/zsh/completions/_bundle
Normal file
@@ -0,0 +1,134 @@
|
||||
#compdef bundle
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bundler (http://gembundler.com).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line _gems _opts ret=1
|
||||
|
||||
_arguments -C -A "-v" -A "--version" \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_values "bundle command" \
|
||||
"install[Install the gems specified by the Gemfile or Gemfile.lock]" \
|
||||
"update[Update dependencies to their latest versions]" \
|
||||
"package[Package the .gem files required by your application]" \
|
||||
"exec[Execute a script in the context of the current bundle]" \
|
||||
"config[Specify and read configuration options for bundler]" \
|
||||
"add[Add the named gem to the Gemfile and run bundle install]" \
|
||||
"binstubs[Generate binstubs for executables in a gem]" \
|
||||
"check[Determine whether the requirements for your application are installed]" \
|
||||
"list[Show all of the gems in the current bundle]" \
|
||||
"show[Show the source location of a particular gem in the bundle]" \
|
||||
"console[Start an IRB session in the context of the current bundle]" \
|
||||
"open[Open an installed gem in the editor]" \
|
||||
"viz[Generate a visual representation of your dependencies]" \
|
||||
"init[Generate a simple Gemfile, placed in the current directory]" \
|
||||
"gem[Create a simple gem, suitable for development with bundler]" \
|
||||
"help[Describe available tasks or one specific task]" \
|
||||
"platform[Displays platform compatibility information]" \
|
||||
"clean[Clean up unused gems in your Bundler directory]" \
|
||||
"doctor[Display warnings about common problems]" \
|
||||
"remove[Removes gems from the Gemfile]" \
|
||||
"outdated[Show all of the outdated gems in the current bundle]"
|
||||
ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
help)
|
||||
_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'add' 'binstubs' 'check' 'list' 'show' 'console' 'open' 'viz' 'init' 'gem' 'help' 'platform' 'clean' 'doctor' 'remove' 'outdated' && ret=0
|
||||
;;
|
||||
install)
|
||||
_policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
|
||||
_arguments \
|
||||
'(--no-color)--no-color[disable colorization in output]' \
|
||||
'(--local)--local[do not attempt to connect to rubygems.org]' \
|
||||
'(--quiet)--quiet[only output warnings and errors]' \
|
||||
'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
|
||||
'(--system)--system[install to the system location]' \
|
||||
'(--deployment)--deployment[install using defaults tuned for deployment environments]' \
|
||||
'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
|
||||
'(--path)--path=-[specify a different path than the system default]:path:_files' \
|
||||
'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
|
||||
'(--without)--without=-[exclude gems that are part of the specified named group]:groups' \
|
||||
'(--with)--with=-[include gems that are part of the specified named group]:groups' \
|
||||
'(--clean)--clean[remove any gems not present in the current Gemfile]' \
|
||||
'(--full-index)--full-index[download and cache the index file of all gems]' \
|
||||
'(--jobs)--jobs=-[install gems parallelly]:number' \
|
||||
'(--force)--force[force download every gem]' \
|
||||
'(--no-cache)--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
|
||||
'(--no-prune)--no-prune[do not remove stale gem from cache after installation]' \
|
||||
'(--retry)--retry=-[number of times to retry failed network or git requests]:number' \
|
||||
'(--sheband)--shebang=-[specify ruby executable to execute scripts]:ruby' \
|
||||
'(--standalone)--standalone=-[create standalone bundles]:groups' \
|
||||
"(--trust-policy)--trust-policy=-[apply the Rubygems security policy]:arg:($_policies)"
|
||||
ret=0
|
||||
;;
|
||||
exec)
|
||||
_normal && ret=0
|
||||
;;
|
||||
(open|show)
|
||||
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
|
||||
if [[ $_gems != "" ]]; then
|
||||
_values 'gems' $_gems && ret=0
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
_opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
|
||||
_opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
|
||||
if [[ $_opts != "" ]]; then
|
||||
_values 'options' $_opts && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
Submodule zsh/.config/zsh/plugins/nix-zsh-completions updated: d9f48b9be5...6e782b9709
Submodule zsh/.config/zsh/plugins/zsh-auto-notify deleted from f8cd00f2b6
Submodule zsh/.config/zsh/plugins/zsh-autosuggestions updated: 146020d9b2...e52ee8ca55
Reference in New Issue
Block a user