Merge 6d421875f5 into 8cd3bd78e8
This commit is contained in:
commit
308319e360
220
src/_chromium
220
src/_chromium
|
|
@ -1,220 +0,0 @@
|
|||
#compdef chromium
|
||||
|
||||
# Copyright 2018 CERN for the benefit of the LHCb Collaboration
|
||||
|
||||
# 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 CERN 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 THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS 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.
|
||||
#
|
||||
# In applying this licence, CERN does not waive the privileges and immunities
|
||||
# granted to it by virtue of its status as an Intergovernmental Organization
|
||||
# or submit itself to any jurisdiction.
|
||||
|
||||
_arguments \
|
||||
"--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \
|
||||
"--app=[Runs URL in app mode]:url:_urls" \
|
||||
"--incognito[Open in incognito mode]" \
|
||||
"--new-window[open in new window]" \
|
||||
"(--no-proxy-server --proxy-auto-detect --proxy-pac-url)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \
|
||||
"--no-proxy-server[Disables the proxy server]" \
|
||||
"--proxy-auto-detect[Autodetect proxy configuration]" \
|
||||
"--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \
|
||||
"--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \
|
||||
"--version[print version]" \
|
||||
'*:: :{ _alternative "urls\:url\:_urls" "file\:file\:_files" }'
|
||||
|
||||
# excerpt from the chromium help message:
|
||||
#
|
||||
# Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests. This overrides any environment variables or settings picked via the options dialog. An individual proxy server is specified
|
||||
# using the format:
|
||||
#
|
||||
#
|
||||
#
|
||||
# Where <proxy-scheme> is the protocol of the proxy server, and is one of:
|
||||
#
|
||||
# "http", "socks", "socks4", "socks5".
|
||||
#
|
||||
# If the <proxy-scheme> is omitted, it defaults to "http". Also note that "socks" is equivalent to "socks5".
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# --proxy-server="foopy:99"
|
||||
# Use the HTTP proxy "foopy:99" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks://foobar:1080"
|
||||
# Use the SOCKS v5 proxy "foobar:1080" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks4://foobar:1080"
|
||||
# Use the SOCKS v4 proxy "foobar:1080" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks5://foobar:66"
|
||||
# Use the SOCKS v5 proxy "foobar:66" to load all URLs.
|
||||
#
|
||||
# It is also possible to specify a separate proxy server for different URL types, by prefixing the proxy server specifier with a URL specifier:
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# --proxy-server="https=proxy1:80;http=socks4://baz:1080"
|
||||
# Load https://* URLs using the HTTP proxy "proxy1:80". And load http://*
|
||||
# URLs using the SOCKS v4 proxy "baz:1080".
|
||||
#
|
||||
|
||||
_chromium_proxyurls () {
|
||||
#TODO: semicolon separated urls not yet implemented
|
||||
# mostly copied from _urls
|
||||
local ipre scheme host user uhosts ret=1 expl glob suf
|
||||
local -a match mbegin mend
|
||||
local localhttp
|
||||
zstyle -a ":completion:${curcontext}:urls" local localhttp
|
||||
local localhttp_servername="$localhttp[1]"
|
||||
local localhttp_documentroot="$localhttp[2]"
|
||||
local localhttp_userdir="$localhttp[3]"
|
||||
zstyle -a ":completion:${curcontext}:urls" urls urls
|
||||
if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]
|
||||
then
|
||||
[[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1]))
|
||||
_wanted urls expl 'URL' compadd "$@" -a urls && return 0
|
||||
urls=()
|
||||
fi
|
||||
urls="$urls[1]"
|
||||
glob=(-g '*(^/)')
|
||||
zparseopts -D -K -E 'g:=glob'
|
||||
ipre="$IPREFIX"
|
||||
if ! compset -P '(#b)([-+.a-z0-9]#):'
|
||||
then
|
||||
_tags -C argument prefixes
|
||||
while _tags
|
||||
do
|
||||
while _next_label prefixes expl 'URL prefix' -S '' "$@"
|
||||
do
|
||||
compset -S '[^:/]*' && compstate[to_end]=''
|
||||
compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
scheme="$match[1]"
|
||||
case "$scheme" in
|
||||
(http(|s)|socks(|4|5)) if ! compset -P //
|
||||
then
|
||||
_wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" //
|
||||
return
|
||||
fi ;;
|
||||
(file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)'
|
||||
[[ -prefix /// ]] && compset -P //
|
||||
if ! compset -P //
|
||||
then
|
||||
_tags -C file files
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
if [[ -prefix / ]]
|
||||
then
|
||||
_path_files "$expl[@]" -S '' "${glob[@]}" && ret=0
|
||||
_path_files "$expl[@]" -S/ -r '/' -/ && ret=0
|
||||
elif [[ -z "$PREFIX" ]]
|
||||
then
|
||||
compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0
|
||||
fi
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi ;;
|
||||
esac
|
||||
if ! compset -P '(#b)([^:/]#)([:/])'
|
||||
then
|
||||
uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t))
|
||||
_tags hosts
|
||||
while _tags
|
||||
do
|
||||
while _next_label hosts expl host
|
||||
do
|
||||
compset -S '[:/]*' || suf="/"
|
||||
(( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0
|
||||
[[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername)
|
||||
compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
host="$match[1]"
|
||||
[[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0
|
||||
_tags remote-files files || return 1
|
||||
if [[ "$localhttp_servername" = "$host" ]]
|
||||
then
|
||||
if compset -P \~
|
||||
then
|
||||
if ! compset -P '(#b)([^/]#)/'
|
||||
then
|
||||
_users -S/ "$@"
|
||||
return
|
||||
fi
|
||||
user="$match[1]"
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
else
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
fi
|
||||
else
|
||||
while _tags
|
||||
do
|
||||
(( $#urls )) && while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0
|
||||
done
|
||||
[[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0
|
||||
(( ret )) || return 0
|
||||
done
|
||||
fi
|
||||
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
|
||||
65
src/_fish
65
src/_fish
|
|
@ -1,65 +0,0 @@
|
|||
#compdef fish
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for fish 4.6.0 (https://fishshell.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_fish_debug_categories() {
|
||||
local -a categories=(${(f)"$(fish --print-debug-categories | awk '{n=$1;$1="";printf("%s[%s]\n",n,substr($0,2)) }')"})
|
||||
_values -s ',' categories $categories
|
||||
}
|
||||
|
||||
_arguments -s \
|
||||
'(-c --command)'{-c,--command=}'[Evaluate the specified commands instead of reading from the commandline]:command' \
|
||||
'(-C --init-command)'{-C,--init-command=}'[Evaluate specified commands after reading the configuration]:command' \
|
||||
'(-d --debug)'{-d,--debug=}'[Enable debug output and specify a pattern for matching categories]:categories:_fish_debug_categories' \
|
||||
'(-i --interactive)'{-i,--interactive}'[The shell is interactive]' \
|
||||
'(-l --login)'{-l,--login}'[Act as if invoked as a login shell]' \
|
||||
'(-N --no-config)'{-N,--no-config}'[Do not read configuration files]' \
|
||||
'(-n --no-execute)'{-n,--no-execute}'[Do not execute any commands, only perform syntax checking]' \
|
||||
'(-p --profile)'{-p,--profile=}'[Output timing information on all executed commands to the specified file]:file:_files' \
|
||||
'--profile-startup=[Write timing for fish startup to specified file]:file:_files' \
|
||||
'(-P --private)'{-P,--private}'[Enable private mode]' \
|
||||
'--print-rusage-self[When fish exits, output stats from getrusage]' \
|
||||
'(- *)--print-debug-categories[Print all debug categories, and then exit]' \
|
||||
'(- *)'{-v,--version}'[Print version and exit]' \
|
||||
'(-f --features)'{-f,--features}'[Enable one or more comma-separated feature flags]:features' \
|
||||
'*:: :_files'
|
||||
|
||||
# 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
|
||||
92
src/_nano
92
src/_nano
|
|
@ -1,92 +0,0 @@
|
|||
#compdef nano
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for nano 8.1
|
||||
# (https://www.nano-editor.org/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -i ret=1
|
||||
|
||||
_arguments -s -S -C \
|
||||
'(-)'{-A,--smarthome}'[enable smart home key]' \
|
||||
'(-B --backup)'{-B,--backup}'[save backups of existing files]' \
|
||||
'(-C --backupdir)'{-C+,--backupdir=}'[specify directory for saving unique backup files]:directory:_directories' \
|
||||
'(-D --boldtext)'{-D,--boldtext}'[use bold instead of reverse video text]' \
|
||||
'(-E --tabstospaces)'{-E,--tabstospaces}'[convert typed tabs to spaces]' \
|
||||
'(-F --multibuffer)'{-F,--multibuffer}'[read a file into a new buffer by default]' \
|
||||
'(-G --locking)'{-G,--locking}'[use vim-style lock files]' \
|
||||
'(-H --historylog)'{-H,--historylog}'[log & read search replace string history]' \
|
||||
'(-I --ignorercfiles)'{-I,--ignorercfiles}"[don't look at nanorc files]" \
|
||||
'(-J --guidestripe)'{-J+,--guidestripe=}'[show a guide bar at specified column]:number' \
|
||||
'(-K --rawsequences)'{-K,--rawsequences}'[fix numeric keypad key confusion problem]' \
|
||||
'(-L --nonewlines)'{-L,--nonewlines}"[don't add an automatic newline]" \
|
||||
'(-M --trimblanks)'{-M,--trimblanks}'[trim trailing spaces when hard-wrapping]' \
|
||||
'(-N --noconvert -u --unix)'{-N,--noconvert}"[don't convert files from DOS/Mac format]" \
|
||||
'(-O --bookstyle)'{-O,--bookstyle}'[leading whitespace means new paragraph]' \
|
||||
'(-P --positionlog)'{-P,--positionlog}'[log & read location of cursor position]' \
|
||||
'(-Q --quotestr)'{-Q+,--quotestr=}'[specify regular expression to match quoted parts of lines]:regex [^([ \t]*([!#%\:;>|}]|//))+]' \
|
||||
'(-R --restricted)'{-R,--restricted}'[restricted mode]' \
|
||||
'(-S --softwrap)'{-S,--softwrap}'[display overly long lines on multiple rows]' \
|
||||
'(-T --tabsize)'{-T+,--tabsize=}'[set width of a tab]:columns [8]' \
|
||||
'(-U --quickblank -c --constantshow -_ --minibar)'{-U,--quickblank}'[do quick statusbar blanking]' \
|
||||
'(- *)'{-V,--version}'[print version information and exit]' \
|
||||
'(-W --wordbounds -X --wordchars)'{-W,--wordbounds}'[detect word boundaries more accurately]' \
|
||||
'(-X --wordchars -W --wordbounds)'{-X+,--wordchars=}'[specify which other characters are word parts]:string' \
|
||||
'(-Y --syntax=)'{-Y+,--syntax=}'[syntax definition to use for coloring]:value' \
|
||||
'(-Z --zap)'{-Z,--zap}'[let backspace and delete erase a marked region]' \
|
||||
'(-a --atblanks)'{-a,--atblanks}'[when soft-wrapping, do it at whitespace]' \
|
||||
'(-b --breaklonglines -w --nowrap)'{-b,--breaklonglines}'[automatically hard-wrap overlong lines]' \
|
||||
'(-c --constantshow -U --quickblank)'{-c,--constantshow}'[show cursor position constantly]' \
|
||||
'(-d --rebinddelete)'{-d,--rebinddelete}'[fix Backspace/Delete confusion problem]' \
|
||||
'(-e --emptyline)'{-e,--emptyline}'[keep the line below the title bar empty]' \
|
||||
'(-f --rcfile)'{-f,--rcfile=}'[Use only specified file for configuring nano]:file:_files' \
|
||||
'(-g --showcursor)'{-g,--showcursor}'[show cursor in file browser & help text]' \
|
||||
'(- *)'{-h,--help}'[show help text and exit]' \
|
||||
'(-i --autoindent)'{-i,--autoindent}'[automatically indent new lines]' \
|
||||
'(-j --jumpyscrolling)'{-j,--jumpyscrolling}'[scroll by half-screen, not by line]' \
|
||||
'(-k --cutfromcursor)'{-k,--cutfromcursor}'[cut from cursor to end of line]' \
|
||||
'(-l --linenumbers)'{-l,--linenumbers}'[show line numbers in front of the text]' \
|
||||
'(-m --mouse)'{-m,--mouse}'[enable the use of the mouse]' \
|
||||
'(-n --noread)'{-n,--noread}"[don't read the file (only write it)]" \
|
||||
'(-o --operatingdir)'{-o+,--operatingdir=}'[set operating directory]:directory:_directories' \
|
||||
'(-p --preserve)'{-p,--preserve}'[preserve XON (^Q) and XOFF (^S) keys]' \
|
||||
'(-q --indicator)'{-q,--indicator}'[show a position+portion indicator]' \
|
||||
'(-r --fill)'{-r+,--fill=}'[set width for hard-wrap and justification]:width [-8]' \
|
||||
'(-s --speller)'{-s+,--speller=}'[enable alternate speller]:program:_command_names -e' \
|
||||
'(-t --tempfile)'{-t,--tempfile}'[auto save on exit, do not prompt]' \
|
||||
'(-u --unix -N --noconvert)'{-u,--unix}'[save a file by default in Unix format]' \
|
||||
'(-v --view)'{-v,--view}'[view mode (read-only)]' \
|
||||
'(-w --nowrap -b --breaklonglines)'{-w,--nowrap}"[don't hard-wrap long lines default]" \
|
||||
'(-x --nohelp)'{-x,--nohelp}"[don't show the two help lines]" \
|
||||
'(-y --afterends)'{-y,--afterends}'[make Ctrl+Right stop at word ends]' \
|
||||
'(-z --suspend)'{-z,--suspend}'[enable suspension]' \
|
||||
'(-@ --colonparsing)'{-@,--colonparsing}'[accept "filename:linenumber" notation]' \
|
||||
'(-% --stateflags)'{-%,--stateflags}'[show some states in the title bar]' \
|
||||
'(-_ --minibar -U --quickblank)'{-_,--minibar}'[suppress the title bar and show information at the bottom of the screen]' \
|
||||
'(-! --magic)'{-\!,--magic}'[try libmagic to determine applicable syntax]' \
|
||||
'(-0 --zero)'{-0,--zero}'[hide all bars, use whole terminal]' \
|
||||
'(-/ --modernbindings)'{-/,--modernbindings}'[use better-known key bindings]' \
|
||||
'(-t -q)*: :->args' && ret=0
|
||||
|
||||
if [[ -n $state ]]; then
|
||||
case $PREFIX in
|
||||
+) _message -e lines "start at a given line" ;;
|
||||
+[crCR]#[/?]) _message -e 'search string' ;;
|
||||
+<->,) _message -e 'column number' ;;
|
||||
*) _files ;;
|
||||
esac && ret=0
|
||||
fi
|
||||
|
||||
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
|
||||
Loading…
Reference in New Issue