diff options
67 files changed, 1277 insertions, 5120 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 484a8cf53..6c86ac450 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -github: [ohmyzsh, robbyrussell, mcornella, larson-carter] +github: [ohmyzsh, robbyrussell, mcornella, larson-carter, carlosala] open_collective: ohmyzsh diff --git a/.github/actions/spelling/README.md b/.github/actions/spelling/README.md deleted file mode 100644 index dcd237ba2..000000000 --- a/.github/actions/spelling/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# check-spelling/check-spelling configuration - -File | Purpose | Format | Info --|-|-|- -[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary) -[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow) -[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject) -[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes) -[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only) -[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns) -[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect) -[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice) - -Note: you can replace any of these files with a directory by the same name (minus the suffix) -and then include multiple files inside that directory (with that suffix) to merge multiple files together. diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md deleted file mode 100644 index c83423a8e..000000000 --- a/.github/actions/spelling/advice.md +++ /dev/null @@ -1,25 +0,0 @@ -<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 --> -<details><summary>If the flagged items do not appear to be text</summary> - -If items relate to a ... -* well-formed pattern. - - If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, - try adding it to the `patterns.txt` file. - - Patterns are Perl 5 Regular Expressions - you can [test]( -https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. - - Note that patterns can't match multiline strings. - -* binary file. - - Please add a file path to the `excludes.txt` file matching the containing file. - - File paths are Perl 5 Regular Expressions - you can [test]( -https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. - - `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( -../tree/HEAD/README.md) (on whichever branch you're using). - -</details> diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt deleted file mode 100644 index e69de29bb..000000000 --- a/.github/actions/spelling/allow.txt +++ /dev/null diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt deleted file mode 100644 index f1cfeefbb..000000000 --- a/.github/actions/spelling/excludes.txt +++ /dev/null @@ -1,41 +0,0 @@ -# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes -(?:^|/)(?i)COPYRIGHT -(?:^|/)(?i)LICEN[CS]E -(?:^|/)package(?:-lock|)\.json$ -(?:^|/)vendor/ -ignore$ -\.avi$ -\.ico$ -\.jpe?g$ -\.lock$ -\.map$ -\.min\.. -\.mod$ -\.mp[34]$ -\.png$ -\.wav$ -^\.github/ -^\Qplugins/archlinux/archlinux.plugin.zsh\E$ -^\Qplugins/cp/cp.plugin.zsh\E$ -^\Qplugins/extract/_extract\E$ -^\Qplugins/genpass/genpass.plugin.zsh\E$ -^\Qplugins/gitignore/gitignore.plugin.zsh\E$ -^\Qplugins/gnu-utils/gnu-utils.plugin.zsh\E$ -^\Qplugins/hitchhiker/fortunes/hitchhiker\E$ -^\Qplugins/jhbuild/jhbuild.plugin.zsh\E$ -^\Qplugins/jhbuild/README.md\E$ -^\Qplugins/jruby/jruby.plugin.zsh\E$ -^\Qplugins/kubectl/kubectl.plugin.zsh\E$ -^\Qplugins/lol/lol.plugin.zsh\E$ -^\Qplugins/mosh/mosh.plugin.zsh\E$ -^\Qplugins/npx/npx.plugin.zsh\E$ -^\Qplugins/powder/_powder\E$ -^\Qplugins/suse/suse.plugin.zsh\E$ -^\Qplugins/thor/_thor\E$ -^\Qplugins/universalarchive/_universalarchive\E$ -^\Qplugins/vagrant/vagrant.plugin.zsh\E$ -^\Qplugins/wp-cli/README.md\E$ -^\Qplugins/wp-cli/wp-cli.plugin.zsh\E$ -^\Qthemes/clean.zsh-theme\E$ -^\Qthemes/philips.zsh-theme\E$ -^\Qthemes/tonotdo.zsh-theme\E$ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt deleted file mode 100644 index 5c5a04ff1..000000000 --- a/.github/actions/spelling/expect.txt +++ /dev/null @@ -1,4494 +0,0 @@ -AAAAC -aac -aar -abcdefghjkmnpqrstvwxyz -ABRT -absorbgitdirs -abspath -abtvfr -acceptorthreads -accessip -ACDIM -acking -ackmate -ackup -ACLs -acon -aconf -acp -acpi -acpitool -acr -acroread -acs -acsc -acsp -acss -actionformats -Adamantium -adb -adbd -adben -addgroups -addhistory -addon -addprincipals -addrport -addrs -addusergroups -addwin -adelcampo -adg -ADK -adminalias -adminport -Admins -adoc -adu -aeiouy -afh -afind -afmagic -afs -afu -agb -agc -agd -agentpath -agi -agignore -agli -aglu -agnoster -agp -agrimaldi -ags -agu -agud -agug -aguu -AHg -ainv -aip -Airbender -ajp -ajs -Akinori -akoenig -alacritty -albers -alberto -alertmanager -alex -alexandre -aliasfiletype -aliaspassword -allexport -alloc -allocstatus -allownoncomponentcallers -allpkgs -alnum -ALRM -altchar -Altoid -alwayz -amanda -amazonaws -amazonec -ambyj -amd -amqp -AMRD -anche -andi -andrewrdwyer -angularjs -anley -anlp -annots -anonymize -anotherfolder -ansible -antrun -anycommand -apexcodefile -apextests -api -apidocs -apiversion -apjanke -apk -apklib -aplaybook -appid -applica -applist -appname -apps -appup -aps -apull -arachnophobia -araxis -ARCHFLAGS -archimport -archlinux -arci -arcizan -ard -ardc -ardnu -ardnupc -ardp -ardpc -ARGC -args -argset -argslist -argu -argv -ARGZERO -arh -arinit -arl -arli -arpa -arquillian -artifactory -asadmin -asc -asciicast -asciidoc -asciidoctor -asciinema -asdeps -asdf -askpass -asm -asmo -asrc -assem -associatewiththread -ASTs -asyncreplication -atlassian -attr -ATTRIBUTENAME -aufs -auin -auinsd -auloc -auls -aulst -aumir -auown -auownloc -auownls -aur -aure -aurem -aurep -aurinsd -aurph -aurrep -authmethods -authorizationdb -authpriv -authrealmname -authz -autoapplyenabled -autoclean -autocomplete -autocompleted -autocompletion -AUTOCONNECT -autocrlf -autodetermine -autodie -autoenv -autohadboverride -autoipd -autojump -autoload -autolock -autolocking -autopep -AUTOQUIT -autoreload -autoreloading -autoremove -autorun -autoscale -autoscaling -autoselect -autoshortened -autosquash -autostart -autostash -autoupdate -auupd -auupg -availabilityenabled -avh -avi -AVIT -avivrosenberg -avneet -avz -avzu -aws -awscli -awslogs -babakks -backend -backendconfig -backtick -backupconfig -backupdir -backupfile -backuptheme -bactrian -baidu -bamshuf -bamtobed -bamtofastq -Barsi -Basecamp -basedir -basedn -basefile -baseurl -basevmdk -bashcompinit -bashdefault -bashrc -batchid -baz -bazel -bazelbuild -bbd -bbdiff -bbedit -BBM -bbpb -bcc -bcdfghjklmnpqrstvwxz -bck -bcn -bcubc -bcubo -beaglidx -becc -bedcov -BEDGRAPH -BEDPE -bedpetobam -bedtobam -bedtools -Belarus -bem -benchmarker -benchmem -benchtime -bento -benwilcock -berks -Bertinelli -bgnotify -bgrewriteeaof -bgsave -binarynights -bindaddress -binded -bindir -bindkey -binpack -binstub -bintray -bip -bira -bisd -bitboxer -bitbucket -bitswap -bitwarden -blkio -blockprofile -blockprofilerate -blod -blog -blogger -blogspot -blpop -bluebox -Bluetooth -bobwilliams -bodycc -Bonetti -bookmarked -booknames -bootclasspath -bootscript -bootsnipp -borland -borrowck -Boudreau -Boushh -Bouvet -BPtmux -bpython -bqr -brainstormr -Brainville -branchformat -branchname -branchrefs -brewp -brewsp -briancarper -bringz -Broadcom -Brodersen -brpop -brpoplpush -btannous -btih -btn -btrestart -btrfs -btw -bubc -bubu -buf -buffersizebytes -buflines -bugfix -bugfixes -bugreport -bugsnag -Buildfile -buildinstance -buildnumber -buildpackage -buildpacks -buildscript -builtins -bundlephobia -bunzip -Burkina -Busybox -bwaht -Bxegedabagacad -bypjyp -bytebuffertype -bytecode -bytewise -byznis -bzip -bzr -cabextract -CACERT -cacertfile -cacheinfo -cachename -caiifr -Cakefile -cakephp -callvim -calmd -calways -caname -caniuse -cano -capath -Capfile -capify -capistrano -capistranorb -capit -CARETCOLOR -caserta -Caskroom -catimg -catserver -catspeak -cbr -ccat -cccmd -ccflags -ccl -ccomp -ccp -cdargs -cdcmd -cdo -CDPATH -cdu -cdx -cdylib -cecho -cehlrtx -celerybeat -celeryev -celerymon -celeryproject -Celso -celsomiranda -certfile -certname -certs -cfa -cfap -cfbpk -cfbs -cfc -cfdel -cfdm -cfdor -cfds -cfe -cfev -cfg -cfgfile -cfhu -cfl -cflg -cflr -cfp -cfpc -cfpm -cfr -cfsc -cfsh -cfsp -cfsrt -cfsrtall -cfstg -cfstp -cfstpall -cft -cfup -cfus -cget -cgi -cgit -cgr -cgrm -cgroup -cgroupns -cgu -changelog -changepassword -changeset -charmap -charset -chaselinks -chcid -chdir -cheatsheet -checkin -checkinit -checkonly -checkports -checkstyle -cheeseshops -Chesal -chiark -childlogdir -chlrtx -chmod -chown -chpwd -chroot -chruby -chrubydirs -chsh -chucknorris -chucknorrisfacts -Chucktatorship -Chucktober -chunker -cidfile -cidr -CIDs -cidv -ciici -cim -cirw -citool -civis -cjk -clamav -classfile -classloaders -classloading -classmap -classname -classpath -CLDR -cleardump -cless -CLICOLOR -clientauthenabled -clientid -clipcmd -clipcopy -clippaste -Clipperton -clj -Clojure -closelim -cloudfoundry -cloudproviders -CLOUDSDK -clrz -clustertype -cmdargs -cmdline -cmds -Cmp -CMR -cms -cmt -cnorm -cobertura -cocoapods -codebase -codeclimate -codecompare -codecoverage -codegen -codepen -coderwall -CODESET -codium -coffeescript -colemak -Colindres -collectstatic -colorbool -colorcoded -colorcoding -colorify -colorized -colorls -colorpair -colorset -colorspec -colourised -Colouriser -colsearch -COMMANDLINE -commandlinefu -committerdate -Comoros -compadd -comparguments -compassdoc -compaudit -compbiome -compcall -compctl -compdef -compdescribe -compdump -compfiles -compfix -compgen -compgroups -compilemessages -compinit -compl -completemarks -completionsdir -complist -componentname -compopt -compquote -COMPREPLY -COMPRESSSPARSESTATE -compset -compstate -comptags -comptry -compvalues -CONDA -CONFG -config -configfile -confighelp -configmap -configstoretype -connectiondefinition -connectionpoolid -conssec -Consts -contacto -containerd -contenttype -contextinitialization -contextroot -contoroll -contreras -controlargs -conventionalcommits -COOKBOOKNAME -cookbookversion -coproc -copybuffer -copydir -copyfile -copypaste -copypasteable -cordova -coreutil -cors -cowsay -cowthink -cpan -cpanm -cpanminus -cpantesters -cpio -cpp -cprint -cprof -cpuprofile -cpuset -cpv -createcachetable -createdlastdays -createsuperuser -createtables -creationretryattempts -creationretryinterval -cription -crlf -crm -crockford -cron -cronjob -crt -cseuckr -cseucpkdfmtjapanese -csh -csibm -csiso -csisolatin -cskoi -csksc -css -cssflow -cssh -csshiftjis -csu -csv -csvfile -ctag -ctl -ctlseqs -ctx -ctype -culater -Cunha -curcontext -curdir -curhistsize -curkeyword -curpath -currentartist -currentdir -currenttrack -cursored -curtheme -Customisation -CUTBUFFER -cvccvc -cvf -cvhs -cvjf -cvs -cvsexportcommit -cvsimport -cvsserver -cvvis -cvzf -cwd -cword -cxx -cya -cycledleft -cycledright -cygpath -cygstart -cygwin -cygwyn -czf -daemonize -daemonized -daemonizing -daemonset -dalias -dango -danielcsgomes -darcs -dartdoc -dartlang -dashdoc -DATABAGNAME -datafieldenc -datasift -datasourceclassname -datastore -datestamp -datetime -daylerees -dbbolton -dbconsole -dbfile -dbhome -dbhost -dbport -dbshell -dbsize -dburl -dbus -dbuser -dbvendor -dbvendorname -dccmd -dcdn -dce -dck -dcl -dclf -dco -dcom -dcommit -dcps -dcpull -dcr -dcrestart -dcrm -dcstart -dcstop -dcup -dcupb -dcupd -ddg -ddl -deadwyler -debian -debman -debuginfo -debuglevel -decr -decrby -DECSCUSR -defaultleasettl -defaultpackagedir -Defaultsfdx -defaultvs -defaultwebmodule -definitionfile -definitionjson -deinit -deinstall -delwin -denable -deno -dependencyfile -deploydir -deployers -deploymentplan -deps -depthfrom -dequote -dequoted -deref -derek -descr -dest -DESTDIR -destroot -desttype -devcenter -devdocs -devfolder -devicehost -devicemapper -deviceport -devlog -devops -devpath -dfa -dffx -dflt -dfmt -dfs -dhcp -dhcpd -dhcpip -dht -dhtrc -dhtt -diagdump -didexit -diffcore -diffmerge -diffs -diffsettings -difftool -digitalocean -diiirrrty -dijcaf -dircolors -dircycle -direnv -dirhistory -dirname -dirpath -dirpersist -dirs -dirstack -DIRSTACKSIZE -dirstat -dirver -disablemasking -disksize -diskutil -displayconfiguration -displayname -distcache -distcheck -distclean -distro -dists -django -djangojs -djangoproject -djangopypi -djview -djvu -dli -dlist -dls -dman -dmatching -dmesg -dmg -dna -dnf -dnfc -dnfgi -dnfgl -dnfgr -dnfi -dnfl -dnfli -dnfmc -dnfp -dnfr -dnfu -dng -dnote -dns -dnsmasq -dnsrr -doap -docck -dockerd -dockerdaemon -dockerenv -Dockerfile -dockerport -dockersearch -docopt -docset -docstring -doctl -doctorjellyface -dogenpunk -doitclient -domaindir -domainname -domainproperties -domterm -Donenfeld -dongweiming -donotwant -dopts -dotall -dotenv -dotest -dotfile -dotnet -doubledash -doublequotes -dowant -dpkg -drca -drcb -drcg -drcj -drcm -drcml -drcr -drct -drcv -drdmp -dren -dreurmail -drf -drfi -drfr -drfra -drfu -Driessen -drif -dris -driverclassname -drn -drnew -droid -dropandcreatetables -dropindexes -droplr -dropreplace -droptables -drpm -drpu -drst -drup -drush -drushrc -drv -drvd -drvg -drw -dsa -dselect -dsl -dssh -dst -dsupport -Dtest -dtrace -dts -duckduckgo -duf -dumpconfig -dumpdata -dumpfiles -duplessis -durationdays -durrheimer -dutchcoders -dvd -dvi -dwim -dwr -dylib -eal -eastermonday -eauth -ebuild -ecd -ecdsa -echotc -echoti -ecma -ecmerge -ecosia -ecto -editorcmd -edu -eecms -eed -eeval -efforted -efile -eframe -egrep -ein -Eisentraut -ejb -ekzsh -Eley -ELGNRCIS -elidable -elif -elim -elisp -elllen -elot -emacs -emacsclient -emacsfun -emacswiki -emails -emberjs -Emelianenko -emoji -emotty -enablesnoop -enacs -endswith -ent -entrypoint -enum -envsubst -envvar -enwom -eocw -EOH -eol -eoq -eow -eoww -eoy -EPOCHREALTIME -epochseconds -eprof -eread -erl -errlog -Errored -esac -escripts -essembeh -etcd -ethanschoonover -ets -etwlogs -euc -EUID -EULAs -eunit -evals -evalstatus -evan -eventlet -eventname -Evernote -Evt -exe -executables -execv -exfxcxdxbxbxbxbxbxbxbx -exfxcxdxbxegedabagacad -existentials -exitcode -exoscale -expandvars -expaning -expireat -expl -explaintypes -explicitouter -expn -expr -exps -exs -extcmd -extdirs -extendedglob -externalid -extmethods -fabfile -facebook -factoryclass -faidx -failconnection -failfast -failurefatal -fakeroot -faqs -fargs -Faroe -fasd -FASTA -fastcgi -fastfile -fastprint -FASTQ -favlist -fbterm -fcap -Fcart -fcgi -Fcrt -fcss -fdfind -fdlimit -feditor -fedoraproject -felipe -felixr -ffls -ffp -ffrm -ffsync -fghijk -fgrep -Fiala -fieldlist -Filemode -filepath -filesize -filestore -filesystem -filetype -filevaultmaster -FILLBAR -filtername -findpeer -findprovs -finetune -firefox -firewalld -firewalls -firstline -fishshell -fitzpatrick -fixmate -fixme -fixperms -FIXTERM -fizsh -fjs -flagstat -flatlist -flattach -flc -fldoc -flget -flickr -flowgraph -flowtype -flr -fluentd -flup -flushall -flushdb -flv -fnd -fnm -fns -Fnv -Folgers -fontello -foodcritic -foqtam -forall -forceoverwrite -forceupgrade -foreach -forrest -fortunecity -forw -fosmid -fotqoh -fpath -fprof -fqn -framep -frecency -frecent -freebsd -freenode -freqs -fri -Friesel -fromaddress -frontend -frontmost -fsc -fscache -fsck -fsl -fsmonitor -FSsh -fstgpy -ftp -fts -fucnul -func -funcsourcetrace -functrace -funtoo -Futuna -futuret -fwl -fwp -fwr -fwrp -fzf -fzfdirs -gaa -gallifrey -gamc -Gamera -gamscp -gapt -gasconfig -Gatorade -gatsbyjs -gav -gba -gbd -gbda -gbk -gbl -gbnm -gbr -gbs -gbsb -gbsg -gbsr -gca -gcam -gcan -gcasm -gcb -gcc -gccd -gccgo -gccgoflags -gcf -gcflags -gch -gcl -gclean -gcloud -gcm -gcmsg -gcn -gco -gcor -gcount -gcp -gcpa -gcpc -gcplogs -gcr -gcs -gcsm -gcssm -gdc -gdca -gdct -gdcw -gdd -gdm -gdnolock -gdt -gdup -gdv -gdw -geca -gecb -gecho -geclup -gecr -geeknote -gegi -geh -gei -geiall -gelcyv -gelf -geli -gemb -gemfile -gemoji -gemp -gemset -gemspec -gemy -generatekey -generatermistubs -genomecov -genpass -genpaths -genzshcomp -geoe -geoff -geoffgarside -getattr -getbit -getcomposer -getdir -geteip -getenv -getfasta -getgb -getip -getline -getln -getopt -getrange -getset -gettext -geun -gevent -Geza -gezalore -gfa -gfg -gfl -gflf -gflff -gflfp -gflfpll -gflh -gflhf -gflhp -gfli -gflr -gflrf -gflrp -gfo -gga -ggf -ggfl -ggl -ggp -ggpnp -ggpull -ggpur -ggpush -ggsup -ggu -ghci -ghf -ghff -ghfh -ghfr -ghfu -ghh -ghostrevery -gignore -gignored -gimmeh -giobi -gistcomment -gitbranch -gitbranchsize -gitcomp -gitcompadd -gitcompappend -gitcompletion -gitdir -gitex -gitfast -gitflow -github -gitignore -gitinfo -gitk -gitmodules -gitpod -GITSS -gitstatus -gitstring -gitweb -givero -gke -gkrellmd -glfsi -glfsls -glfsmi -glfst -glg -glgg -glgga -glgm -glgp -glidenote -glo -globalias -globals -globbing -globsubst -glods -glog -gloga -glol -glola -glp -gls -gma -gmail -gmom -gmtl -gmtlvim -gmum -Gneat -Gniazdowski -gnore -gnupg -goc -godoc -Godzilla -gof -gofa -gofmt -goga -Gohr -golang -gom -GOMAXPROCS -Gomes -Gonz -goodreads -google -googlecode -gop -gopath -gopb -GOROOT -goroutine -gota -gpf -gpg -gpgconf -gplfs -GPLv -gpoat -gpr -gpristine -gpsup -gpu -gpus -gpv -gradle -gradlew -graphviz -grb -grba -grbc -grbd -grbi -grbm -grbo -grbom -grc -greenend -greer -grename -grep -grepping -grev -grh -grhh -GRIMALDI -grk -Grlm -grm -grmc -grml -grmv -groh -grok -Grosenbach -groupby -groupinstall -grouplist -groupremove -groupsmap -growlnotify -grrm -grset -grss -grst -grt -gru -gruntfile -grup -grv -gsb -gsd -gsemet -gsh -gsi -gsps -gsr -gss -gst -gsta -gstaa -gstall -gstc -gstd -gstl -gstp -gstu -gsu -gsub -gsw -gswc -gswd -gswm -gtb -gtfo -gtl -gts -gtv -gua -Guake -Guerci -gui -guidovansteen -guitool -gulpfile -gulpjs -gunignore -gunwip -gunzip -gupa -gupav -gupv -gvim -gvimdiff -gwc -gwch -gwip -gwt -Gxfxcxdxbxegedabagacad -gxvx -gyazo -Gyver -gzip -Hackage -Hacktoberfest -hackzor -hacluster -hadouken -hai -haldaemon -Halis -Hamelink -hammertest -hanami -hanamirb -har -hardcoded -hardlinks -hardstatus -harishnarayanan -hashh -Hashicorp -haskell -haskellstack -Hasklig -hawaga -hax -HBAR -hbm -Hcode -hda -hdc -hdd -hdel -hdp -hdrs -hdtp -hdv -hea -healthcheck -healthcheckerinterval -healthcheckertimeout -healthcheckerurl -heduled -heg -Helens -helpmojo -heroku -hexdocs -hexdump -hexists -hga -hgb -hgba -hgbk -hgc -hgca -hgchangeset -hgco -hgd -hged -hget -hgetall -hgi -hgic -hgl -hglg -hglgp -hglr -hgm -hgo -hgoc -hgp -hgrc -hgrep -hgs -hgsl -hgun -hhatto -hhh -hidefiles -highlighter -hincrby -HISTCMD -HISTFILE -HISTNO -historywords -histsize -histsubstrsrch -hitokoto -hkeys -hkscs -hlen -hmget -hmset -Hocevar -hocho -hoeg -Homeboy -homepage -hostip -hostname -hostpath -hotfix -hotfixes -hotlist -hotpink -howto -howtorun -hpodder -href -hrg -hscolour -hscroll -hset -hsetnx -hsi -hsp -hsqldb -htm -html -htmlsingle -htop -htslib -HTT -http -httpd -httpie -httplisteners -httpparams -httpsrouting -httpstatus -hubflow -hukkan -humza -huyy -hvals -hyperlink -hypermedia -hyperv -hypervisor -iam -ian -ianchesal -ibest -icanhas -icanhazip -icba -icbi -icc -icode -icpaa -icpai -icpra -icpri -icra -icri -icrosoft -icrsa -icrsi -idlekeytimeoutseconds -idletimeout -idmv -idx -idxstats -ietf -ifargs -ifconfig -iflist -iglob -ignoredescriptoritem -ignoreerrors -ignorenonexistent -ignorewarnings -igv -ihasbucket -iiop -iiopport -ilikenwf -ilkka -ima -imageshack -imap -imatch -imatches -img -imgur -iminurbase -imnp -imonit -impl -implicits -importpath -inbox -incrby -indexopts -inet -infocmp -ini -initsql -inkytonik -inl -inliner -inlining -inplace -inprogress -Inproper -inputenc -inr -insecureskipverify -insns -inspectdb -inspr -instagram -Installable -installationkey -installationkeybypass -installdeps -installdir -installsuffix -instancealias -instanceport -instanceurl -instaweb -instrs -integ -Intellij -interactivecomments -interdiff -interfacename -interoperability -interp -Intf -inur -invicem -iojs -iokit -ionescu -ionicframework -iops -ioreg -ipa -ipaddr -ipam -ipamdriver -ipapp -ipc -ipcidr -ipe -ipfs -ipld -ipns -IPREFIX -ipsw -iptables -ipv -ipython -irb -irc -IRTY -isconnectvalidatereq -isdefaultprovider -isdeleted -isearch -isfile -isisolationguaranteed -isodate -isodatesec -isolationlevel -isredeploy -istio -ISUFFIX -isundeploy -iterm -itertools -itunes -ivan -Ivoire -ixfuk -izakaya -ize -jacc -jaccard -jaddr -jaischeema -jakefile -jakejs -Janke -japvyz -jarfile -JARIN -jarsigner -javabootclasspath -javac -javadoc -javaextdirs -javamail -javap -javascript -javax -jbm -jboss -jcon -jdbc -jdc -jdcds -jde -jdeps -JDK -jdkinternals -jdl -jdlr -jdm -jdmds -jdwp -jeb -jecdyq -ject -Jedis -jeffmhubbard -jenv -jenvdir -jepgad -jerryling -jestjs -jex -jexec -jfrog -jgitflow -jgpagent -jid -jimhester -jimweirich -jira -jis -jisse -jkc -jkenabled -JLine -jlist -jmc -jmsdbpassword -jmsdest -jmx -jndi -jndilookupname -jnrowe -jobid -jobspec -jobstates -jobtexts -jof -johnhamelink -joly -jonas -jonmosco -jorge -journald -jpeg -jpg -jpo -jprofile -jql -jquery -jra -jraw -jrel -jreld -jrm -jrmds -jrmrel -jrmsas -jrp -jrs -jrspec -jruby -jsa -jsh -jshc -jshm -json -jsonfunc -jsonpath -jsontool -jsp -jspa -jssl -jst -jstj -jsu -jsw -jukie -junegunn -junex -junit -junkbust -JUNKFOOD -Juraj -jvenant -jvm -jvmargs -jvmoptions -jwt -jwtkeyfile -jxr -kajrod -kalsi -kapeli -kapow -kate -Kaving -kbd -kca -kcbt -kccc -kcdc -kcgc -kclean -kcn -kcp -kcsc -kcub -kcuc -kcud -kcuf -kcuu -kdch -kdcj -kdcm -kdd -kde -kdel -kdelcj -kdelcm -kdeld -kdelf -kdeli -kdelno -kdelns -kdelp -kdelpvc -kdelsa -kdelsec -kdelss -kdi -kdialog -kdiff -kdm -kdno -kdns -kdp -kdpvc -kds -kdsa -kdsec -Keanu -kecj -kecm -keds -keepfailedstubs -keepreposdir -keepstate -kei -kepvc -kerndeb -kes -keti -kevinkirkup -kexec -kextload -kextunload -keybindings -keycap -keychain -keyfile -keygen -keymap -keymetrics -keypair -keyring -keyshares -keysize -keyspace -keythreshold -KEYTIMEOUT -keytooloptions -keywordisfresh -keywordmsg -keywordquickly -kga -kgaa -kgcj -kgcm -kgd -kgdsw -kgdw -kgdwide -kgi -kgno -kgns -kgp -kgpl -kgpn -kgpvc -kgpvcw -kgpw -kgpwide -kgrs -kgs -kgsec -kgssw -kgsswide -kgsw -kgswide -Khas -khome -killall -killit -Kindergarteners -Kitts -kiwiirc -kiwish -kjx -klf -Klingberg -knative -kni -knifecmd -knifesubcmd -knp -knu -koenig -Kombat -kompare -konsole -kotlin -kotlintest -kpf -kphoen -kpkg -kpp -kres -krh -Krivitsky -krsd -krsss -kru -ksc -ksd -ksh -ksharrays -kshautoload -kshglob -kshoptionprint -ksshaskpass -ksss -kthxbai -kts -kube -kubeconfig -kubectl -kubectx -kubens -kubeoff -kubeon -kubernetes -kungfoo -Kurapati -kwargs -kypkvcw -Kyrgyzstan -Lacheze -lambdalift -lando -langinfo -laravel -lart -lastcategory -lastcmd -lastfull -lastrun -lastsave -launchctl -lazyconnectionassociation -lazyconnectionenlistment -lazyvals -lbenableallapplications -lbenableallinstances -lbenabled -lblue -lbname -lbpolicy -lbpolicymodule -lbtargets -lbuf -LBUFFER -lbweight -lcmd -ldap -ldflags -ldot -leakreclaim -leaktimeout -leavebrowseropen -lein -leiningen -lemy -len -Lengyel -leonhartx -LESSCLOSE -lesskey -LESSKEYIN -LESSOPEN -letcat -leter -lexduv -lexer -lfs -lho -lhs -libc -libedit -libexec -libnotify -libp -libreadline -libsecret -lifecycle -lighthouseapp -limegreen -lindex -linearizer -linewords -linkcheck -linkname -linsert -linux -linuxcommando -linuxcontainers -linuxmain -liquibase -listeneraddress -listenerport -livecheck -liveserver -llc -LLCORNER -llen -llr -llvm -lmnop -lname -loadconfig -loaddata -loadorder -localhost -localonly -localoptions -localtime -localtraps -lockdown -lockfile -lodash -logcat -logdriver -logentries -logfile -logid -loginurl -loglevel -logname -logreportederrors -logrotate -logtype -lol -lowerip -lpop -lpr -lpush -lpushx -lrange -lrbu -LRCORNER -lrem -lrh -lrp -lrt -lrunzip -lrz -lrzip -lrzuntar -lsa -lsb -lscolors -lset -lsof -lstheme -lstrip -lto -ltrim -lubs -lucentbeing -lvi -lways -lwc -lwd -lxc -lxd -lzcat -lzip -lzma -lzo -lzop -LZW -Maarten -macos -macports -macromates -Maeda -Magento -magerun -magicequalsubst -magick -mailhost -mailinfo -mailmap -mailnull -mailrc -mailsplit -mailuser -mainporcelain -maintail -maintainership -makecache -MAKEFLAGS -makemessages -makemigrations -makewindows -managedreleased -managepy -manni -manpage -manpath -mapcar -mapfile -mappedpassword -mappedusername -markname -markpath -maskfasta -maskray -masq -massimiliano -matchconnections -mathfunc -Mattern -Matth -matthewratzloff -matthr -maxbytes -maxchildren -maxconnectionscount -maxconnectionusagecount -maxdepth -maxleasettl -maxpoolsize -maxqueuesize -maxrank -maxrate -maxrequests -maxspare -maxtasksperchild -maxthreadpoolsize -maxwait -Mayen -Mayra -mbean -mbegin -mbologna -mbox -mboxrd -mbp -mca -mcl -mcm -mco -mcornella -mct -mdapi -mdb -mde -mdi -mdn -mds -meanlife -mediawiki -megazord -meh -Mek -mekanics -memprofile -memprofilerate -memq -menuselect -MENUSIZE -mergetool -mergewebxml -merkledag -Mery -messagebus -messagestoretype -metacpan -metadata -metricscollector -mfa -mfaerevaag -mfs -mget -miam -michelebologna -microk -microsoft -middleware -midsommar -midsommarafton -mikeh -millis -mindepth -minfds -minidisc -minikube -minlogprob -minprocs -minspare -minthreadpoolsize -mirko -mirrorlist -mixin -mkcd -mkdir -mkdirs -mktag -mktemp -mktree -mkv -mkvirtualenv -mla -mldonkey -Mleb -MLH -mli -mlo -mlog -mlp -mls -mlterm -MMA -mmap -mmin -mng -mnt -moar -modded -modifiedlastdays -modulename -Moldova -mongocli -mongodb -monit -monitorable -monokai -Morote -Mosco -mosh -mostfrequent -MOTD -mountpoint -mov -moyai -mozilla -mpa -mpeg -mpileup -mpkg -mplayer -mplex -mpr -mputniorz -mqhost -mqpassword -mqport -mquser -mre -mrp -mset -msetnx -msgnum -msgs -msh -msil -msp -mst -msvs -msw -msys -msysgit -mtime -mtu -Mudkipz -multiaddresses -multibase -multicastaddress -multicastport -multicov -multihashes -multiinter -multiline -multios -multiset -mumpub -munication -MURI -muscato -mutex -muxer -mvim -mvn -mvnag -mvnboot -mvnc -mvncd -mvnce -mvnci -mvncie -mvncini -mvncist -mvncisto -mvncom -mvncp -mvnct -mvncv -mvncvst -mvnd -mvndocs -mvndt -mvne -mvnfmt -mvnjetty -mvnp -mvnqdev -mvnsrc -mvnt -mvntc -mvnw -Mvt -Myanmar -myapp -myargs -myd -mydeb -myers -myfile -myfirstnamemylastname -mygit -myissues -mymark -myns -myprop -mypy -myrole -myserver -mysql -mysqladmin -mysqlrestart -mysqlstart -mysqlstatus -mysqlstop -mytime -myuser -myvalue -myvirtualenv -myzsh -nables -nagios -naliases -nameddirs -namespace -namesys -nanoant -nanoc -Narayanan -Naruto -nativelibrarypath -ncd -ncipe -NCOLOR -ncpu -ncs -ncv -ndjson -NDUw -NEm -nenv -neovim -netbsd -netdump -netloc -netmask -netstat -networkdriver -networklisteners -neuralsandwich -newcons -newpl -newvol -nextgenthemes -nfsnobody -nfunctions -nginx -ngnix -ngth -nhelp -nhistory -nhughes -nicoulaj -Nicoulaud -nixos -nkeywords -nkill -nle -nlinux -nlist -nmap -nmatches -Nmh -Nms -Nmw -noacl -noancestors -noargs -noautonamedirs -noautopushd -noblock -nobootcp -nobreak -nocache -nochunk -nocleanup -nocolor -nocopy -nocorrect -nodaemon -nodedir -nodefaultpolicy -nodegroup -nodehost -nodeid -nodejs -nodense -nodestatus -noexec -noexpand -noglob -noheading -nohelpers -nohup -noinput -nojline -noksh -nomadproject -nomnom -nomz -nonamespace -nondistributable -nongnu -NONINFRINGEMENT -nonomatch -NONSELECTABLE -nontransactionalconnections -nopassword -noposixbuiltins -noprofile -noprompt -nopromptsubst -noptions -nopushdminus -norc -noreload -NORMARG -NORRIS -noshortloops -noshwordsplit -nospace -nosplash -nostatic -nostatus -nostream -notactive -notailcalls -notest -nothreading -notifu -notnull -nounit -noverbose -nowai -nowarn -noword -noyes -NPAGE -npanelize -npm -npmd -npmg -npmi -npmjs -npmrc -npmst -npmt -npr -nproc -npu -npx -nroff -nscd -nsu -nthemes -ntlp -ntp -ntu -nubxa -nuc -nuget -numstat -nvcsformats -nvie -nvimdiff -nvm -nvmrc -Oakv -oanward -oathtool -OAuth -objectname -objectsize -objecttype -obsrun -obtw -octocat -octozen -oden -ofd -ogg -ogm -ohmyz -ohmyzsh -oid -oldp -oldpatmat -OLDPWD -OMITSPARSESTATE -OMMIT -omz -omztemp -onbehalfof -oneline -onlyrepos -onoz -ooanward -oom -openbsd -opendiff -openr -openshift -opensource -openssh -openstack -opensuse -openvpn -openw -OPTARG -optimisations -OPTIND -orderby -orgdir -orgs -oris -ority -orm -ornicar -orss -osascript -osname -osscan -ostype -osver -osx -oth -otp -otpcode -Ouellet -oug -outfh -outfile -outfilebase -outfilename -outlog -outputdir -outputtedto -Outputters -pacac -pacaur -pacdisowned -pacfiles -pacfileupg -pacin -pacinsd -packagecreaterequestid -packageid -packagekitd -packagename -packageobjects -packagephobia -packagetype -packageversionid -paclist -pacloc -pacls -paclsorphans -pacman -pacmanallkeys -pacmansignkeys -pacmir -pacoc -pacown -pacre -pacrem -pacrep -pacrmorphans -pacupd -pacupg -pacweb -pagage -pagename -painsd -pairtobed -pairtopair -paloc -palst -pamc -pame -pamf -pamfa -pamir -pamj -paml -pamm -pamn -pamp -pampp -pamr -pamt -panelize -paorph -paperclips -paqf -paqft -paql -paqr -paqt -paqw -paralint -params -parem -parep -PARGON -parhaat -paroc -parseable -parseopt -parwok -passivepopup -passphrase -passthrough -passthru -passwd -passwordstore -pastebin -pasu -patchformat -pathspec -patmat -patshead -paupd -paupg -pausedservices -pavic -paypal -paypalobjects -pbcopy -pbi -pbl -pbo -pbpaste -pbs -pbu -pcap -pch -pchk -pcl -pcmode -pcpu -PCR -pcre -pdf -PDoc -peb -peepcode -peerid -pem -percol -perflog -perl -perlbrew -perldoc -permset -permsetname -petere -peterhoeg -Pfenniger -pfs -pgp -pgpkeys -pgr -pgrep -pgs -phab -phing -phome -php -phx -pid -pidev -pidfile -pidof -pigz -pipenv -pipestatus -pipfile -pipir -piplist -pipreq -pipunall -pipupall -Pitcairn -pjdb -pjo -PKGBUILD -pkgfile -plaetinck -planetargon -playlists -playpause -ple -pleted -plist -Plug'n -plugin -pluginsdir -plz -pmat -pmd -pmin -pmset -png -pnp -podfile -podspec -policyconfigfactoryclass -policyproviderclass -polipo -polkitd -poo -poolname -poolresize -Poorter -popd -Popen -porcheron -portbase -portdir -Portfile -portlist -portname -posix -possen -posteo -posterasure -postgres -postinstallurl -posva -powd -powed -Powerline -poweroff -powershell -powify -powit -PPAGE -ppap -ppid -ppy -precache -precaire -precmd -precompilejsp -precompilewait -predef -preexec -prefetching -prefiltered -prefork -preload -premajor -preminor -prepatch -prepends -prepopulate -prettylist -previewer -prevword -pri -princ -principalsmap -printenv -printf -printflags -printprompt -privhist -privoxy -procfs -procs -prodlog -progfile -projectname -PROMPTCOLOR -PROMPTPREFIX -promptsize -promptsubst -promptvars -propget -proplist -protobuf -providertype -prun -pscpu -pseudoword -psgrep -psh -psmem -psprint -pstadler -pstree -psu -psubscribe -psy -psykorebase -pthree -ptot -ptree -pubgrub -publishwait -pubsub -puni -punsubscribe -puo -pushd -pushdefault -pushdf -pushdignoredups -pushdminus -pushdsilent -pushln -pushremote -pushurl -Putniorz -pvc -pvenv -pvm -pwd -PWDCASECORRECT -PWDLEN -pwdsize -pwdx -pwgen -pwh -pwned -pxd -pxy -pybundles -pyc -pycache -pyclean -pyenv -pyenvdirs -pyfind -pygmentize -pygments -pygrep -pylint -pypa -pypi -pytb -pytest -pythonhosted -pythonpath -pythonrc -PYTHONSTARTUP -PYTHONUSERBASE -pyuserpaths -Qdt -qiqmiq -qkey -qlmanage -qpwd -Qql -Qqo -qqq -qqwtzgejwgqve -Qtdq -quarkus -quicklisp -quickstart -quiltimport -qunit -qunitjs -quotationspage -quotedir -quu -quux -qwant -qwerty -qxtm -qyjti -rabin -rackspace -rackup -radvd -raek -Rakefile -raname -randomkey -rangepos -rar -ratijas -rawurldecode -rawurlencode -rbenv -rbenvdirs -rbfu -RBUFFER -rbw -rcfile -Rchive -rcs -rdargument -rdb -rdc -rdd -rdependents -rdeps -rdm -rdmd -rdmr -rdmtc -rdmu -rdoc -rdp -rdr -rds -rdsl -rdtc -rdtp -reactjs -readline -readlink -readme -readonly -readthedocs -readtimeoutmillis -Reagle -realcmd -reauthor -rebased -rebases -rebasing -receivepack -reddit -redirectport -redis -rediscli -redistrubute -redzone -reencode -reexec -refactor -refchecks -reflogs -refmap -refname -refspec -regex -regexes -regexn -regexp -reheader -reintializes -Reitsma -rej -reldates -reldist -releasenotesurl -releaseversion -relid -reloadinterval -reloadpost -reltool -remco -remoteonly -remotetestdir -removegroups -removeprincipals -removeusergroups -renamenx -rephorm -replacetokens -repow -reprovider -requestauthrecipient -requestauthsource -requestid -rerere -resetstat -resolv -resolvemsg -responseauthrecipient -responseauthsource -responsetimeout -restartpost -restype -resultformat -retcode -retlog -retrievefile -retrievetargetdir -returncode -RETVAL -revdeps -revlist -rfa -rfakeroot -rfap -rfbu -rfc -RFh -rfind -rgm -rhash -rinass -rinf -ripgrep -riseup -RIXIUS -rlc -Rli -rlib -Rlvi -rmacs -rmcup -rmd -rmdir -rmdsstore -rmdup -rmi -rmkx -rnand -rnatv -rnaw -rnios -rniosse -rniosx -rniosxr -rniosxsm -rnipad -rnipada -rnipadm -rnipadp -rnipadr -rnland -rnlink -rnlios -rns -robby -robbyrussell -ROLENAME -rollbackonerror -rootdir -rosrc -roswell -ROSWELLPATH -roundhoused -routecookie -rpath -rpc -rpcuser -rpmpackage -rpms -rpo -rpop -rpoplpush -rprompt -rpush -rpushx -rra -rrg -rsa -rsb -rsd -rset -rsh -rsp -rspec -rsrra -rst -rsto -rstrip -rsync -rtfm -rtkit -rtorrent -rts -rubocop -rubygems -rubyonrails -rubyprompt -rubypromptsize -rubyversion -Rudkin -rulz -runfcgi -runningservers -runningservices -runpy -runserver -runtests -runtfile -runtimes -RUNZSH -Ruslan -ruslanspivak -rustc -rustup -Rvi -rvm -rvmprompt -rvmpromptsize -rxvt -saas -sadd -salesforce -samtools -sandboxed -SAVEHIST -savelogin -savemasterpassword -sba -sbc -sbcc -sbcln -sbco -sbcp -sbcq -sbd -sbdc -sbdi -sbgi -sbin -sbp -sbpl -sbr -sbrake -sbrm -sbt -sbu -sbx -scalac -scaladoc -scalatest -scaleway -scandeps -scard -scd -scdalias -scdaliases -scdhistory -scdignore -scgi -sched -scheduledrundatetime -Schlatow -scm -scmpublish -scorpius -scottkidder -scp -screencast -screenshot -SCTP -scu -scutil -scw -scwsearch -sdiff -sdiffstore -sdist -sdk -sdkman -Sdl -sdurrheimer -Seagal -searchterm -seccomp -securityenabled -securitymap -securitytype -segfault -selectables -selectionkeyhandler -selectiveanf -selectivecps -selectorpolltimeoutmillis -selfupdate -selinux -semver -sendemail -sendperiod -serialfile -serialno -serverlist -servername -serverurl -serviceproperties -serviceuser -servlet -setab -setaf -setalias -setapp -setbit -setdefaultdevhubusername -setdefaulttimeout -setdefaultusername -setenv -setex -setnx -setopt -setprompt -setrange -sfcl -sfcontainer -sfcw -sfdc -sfdev -sfdx -sfdxcli -sfdxurl -sfdxurlfile -sfffe -sfgb -sfgc -sfgcom -sfge -sfn -sfprod -sfroute -SFSB -sfsr -sfsu -sftp -sfx -sgem -sgr -sgrep -sgtatham -shasum -sheerun -shellcheck -shellinit -shellperson -SHELLPROXY -shitload -SHLVL -shm -Shohei -shopt -shortlist -shortlog -shortname -shortstat -SHOWCOLORHINTS -showcurrentpatch -showdeprecated -SHOWDIRTYSTATE -showfiles -showformat -showmigrations -showpkg -SHOWSTASHSTATE -showsubclasses -SHOWUNTRACKEDFILES -showupstream -shpotify -shuf -shunit -Shyamshankar -sid -sidekiq -sideload -SIGINT -SIGKILL -sigs -SIMBL -Sindre -sindresorhus -singlechar -singlepackage -Sint -sinterstore -sirech -sismember -sitecookbooks -sitesearch -sjis -skintone -skiptraceflag -skitch -slaveof -slicehost -sln -slogin -slp -smacs -smartlist -smartsync -smcup -smembers -smerge -smkx -Smood -smove -smt -smtp -Smurf -snapshotname -snowboarder -sobject -sobjectid -sobjecttreefiles -sobjecttype -sobjecttypecategory -socio -socw -softlayer -solaris -som -soq -soql -Sorhus -sorin -sortconip -sortcons -sortnr -sortr -sourceapiversion -sourced -sourcedir -sourcefile -sourceforge -sourceorg -sourcepath -sourcetype -sourcing -soww -soyc -spacewander -spam -spd -spearce -speartail -spf -spi -Spivak -splitbrain -splitlines -splunk -spock -spop -spork -spotify -springframework -sprintf -sprunge -spu -spx -sql -sqlall -sqlc -sqlclear -sqlcustom -sqldropindexes -sqlflush -sqlindexes -sqlinitialdata -sqlq -sqlsan -sqlsequencereset -sqltracelisteners -squashmigrations -srake -srandmember -src -srem -ssh -sshd -sshkey -sshkeyfile -sshkeypassphrase -sshpassword -sshport -sshpublickeyfile -sshuser -ssl -sslproxyhost -sslproxyport -ssm -sso -sst -sstat -stackoverflow -stacktrace -stagedstr -standalone -standaloneonly -startapp -startpage -startpost -startproject -startswith -startus -statd -statedb -statefile -statefulset -statelist -statementcachesize -statementleakreclaim -statementleaktimeout -statementtimeout -STATESEPARATOR -staticlib -statuspost -stderr -stdin -stdio -stdlayout -stdlib -stdout -steadypoolsize -stedolan -steeef -sterr -stevelosh -stgit -stil -STITLE -stn -stoppedservers -stoppedservices -stoppost -stopwait -storeprotocol -storeprotocolclass -stp -strfile -strftime -stringification -stringified -stringify -stripspace -strlen -strverscmp -Strzelecki -sts -stt -stty -stu -stylesheets -subcmds -subdigital -subdir -subdomain -subfolder -Subhaditya -subl -sublimemerge -sublimetext -subm -subnut -subpage -subpath -subscriberfile -subscriberorg -subservices -subshells -subspec -substr -subsubcmds -Subsubcommands -Subsubsubcommands -sudo -sudoedit -suitenames -sunaku -sunion -sunionstore -supad -superaccessors -supervisorctl -supervisord -suppresscc -suprl -suprm -suprr -suprs -supso -supsr -supu -Suraj -surryhill -suse -svcat -svg -svm -svn -svnsync -svntrunk -swiftc -swiftpm -sxa -sxc -sxd -sxf -sxfn -sxm -sxn -sxp -sxu -sxw -sxy -sykora -symfony -symkinds -symlink -Symlinking -symref -syms -syncdb -SYNOPSYS -syns -syohex -sys -sysadmins -sysctl -syslog -sysread -sysroot -systemadmin -systemctl -systemd -systeminfo -systemproperties -Syu -Syua -Syy -Tabone -tagname -tailcalls -Tajikistan -takedir -takegit -takeurl -tanabata -tarball -tarfile -targetcut -targetdevhubusername -targetprotocol -targetted -targetusername -Tasche -Tascii -taskwarrior -Tassilo -tatooine -tavric -tbz -tcl -tcp -tcpdump -tcpip -tcpnodelay -tcsh -tdiff -tdiffstr -tempdir -tempfile -tempfilename -TEMPLATENAME -terday -termcap -termcolor -Termfile -terminalapp -terminfo -terminitor -termsupport -termux -TERMWIDTH -terraform -terremark -testflag -testfunc -testlevel -testlog -testname -testng -testrb -testrunid -testrunner -testserver -textastic -textasticapp -textconv -textfile -textmate -tformat -tfstate -tftp -tfvars -tgz -thedir -thefuck -themeisfresh -thememsg -there're -thibault -thisfcn -Thoumie -threadpool -threadpoolid -thu -tif -timeoutmsec -timeremaining -timetolive -timewait -timothybasanov -tion -titlebar -tjkirch -tkachenko -tkdiff -tkss -tksv -tldr -Tlp -tls -tlscacert -tlscert -tlsciphers -tlsenabled -tlskey -tlsrollbackenabled -tlsverify -tlz -tmp -tmpdir -tmpfile -tmpfs -tmux -tmuxinator -tne -tnn -tobed -todo -Tokenise -tokenized -tolower -tomee -tonotdo -toolchain -toolcp -toplevel -Toponce -torrez -torromeo -tortoisemerge -totp -totpkey -Touron -tput -traceroute -trackball -transactionlogdir -transactionsupport -transferencoding -transprotocol -transprotocolclass -trapd -trconf -triggerevents -triggername -trins -trinsd -trizen -trloc -trlst -trmir -Troiae -Trojanowski -trorph -trre -trrem -trrep -trsu -trunc -trupd -trupg -tsdh -tsl -ttl -ttr -ttyctl -ttys -tview -twohead -txl -txn -txo -txs -txz -tycho -typechecking -typescriptlang -typesetsilent -typespec -typoes -tzst -uapprox -uberjar -Ubfksu -ubuntu -udp -uescape -UFE -ufw -uid -ukpog -ULCORNER -ulimit -Ullrich -ultiple -umask -umd -umich -unace -unalias -uname -unarchive -Uncomment -uncommit -uncompress -uncurry -undelete -undeploy -unedit -unescape -unexport -unexpose -unfunction -unhash -unheap -unhost -unicode -unidiff -unindex -uninst -uninstall -uninstalling -unionbedg -uniq -uniqid -uniquetablenames -unittest -universalarchive -unixfs -unixstamp -unlimit -unlzma -unmark -unmatch -unmonitor -unmute -unpause -unrar -unreachability -unsetopt -unshallow -unshare -unstagedstr -unstartup -unsubscribe -untag -unversioned -unwatch -unwip -unxz -unzstd -updatedb -updateonsave -updatestartuptty -upgr -upgradable -upgradetype -uploadpack -upperip -upsert -urandom -URCORNER -uri -url -urldecode -urlencode -urllib -urlmatch -urlonly -urlparse -urlstring -urltools -urxvt -usb -usbmux -usejavacp -uselimit -usemasterpassword -usergroups -userguide -userland -username -userns -userpass -userpassword -usetoolingapi -usetty -usr -utc -utf -utils -utm -uucp -UUID -Vagrantfile -vagrantup -valentinbud -validateatmostonceperiod -validateddeployrequestid -validateschema -validationclassname -validationmethod -validationtable -Valodim -vals -varargs -vared -varkey -varname -vaultproject -vba -vbl -vbm -vbo -vbox -vbqs -vbr -vbu -vcf -vcmp -vcs -vcsa -vdf -vectorize -Venant -vendored -venv -Verhoef -Verma -VERSINFO -versioncomp -versiondescription -versioned -versioning -versionname -versionnumber -versiontagprefix -verstr -vfs -vgi -vgrepping -vgs -vguerci -vhost -vhsp -vicmd -viewtopic -viins -vimdiff -vimgrep -vimrc -violenz -viopp -virtenv -virtualbox -virtualenv -virtualenvwrapper -virtualizing -virtualservers -virumque -visitpage -visualforce -visualstudio -VMDK -VMs -vmwarefusion -vmwarevcloudair -vmwarevsphere -vnc -vncviewer -vnd -voggom -Voldemort -volumedriver -vonnegut -Vop -vopts -vpaivatorres -vpc -vpli -vpll -vplu -vplun -vpr -vrdp -vre -vrp -vsc -vsca -vscd -vscde -vscg -vscie -vscl -vscn -vscode -vscodium -vscr -vscu -vscue -vscv -vscw -vsh -vsix -vsp -vsplit -vssh -vsshc -vssp -vst -VTE -vterm -Vue -vuejs -vulns -vulscan -vundle -vup -vvsp -vvv -vwxyz -vydpig -waittime -wakeonlan -walle -wantlist -warpdir -warprc -wav -wclip -wcomp -Webchat -weblog -webm -webrick -webscr -webserver -website -webtraffic -Wegner -Weiming -Weirich -Wez -wfilter -wget -whatchanged -whatisthor -whatthecommit -whatwg -whitespacelist -whl -whoami -wiki -wikipedia -wil -willmendesneto -wincmd -windowid -windowsdomain -windowspassword -windowsuser -wip -wjst -wks -wlne -wolframalpha -womens -wordbits -WORDBREAKS -WORDCHARS -wordlist -wordpress -workaround -workdir -workflow -workon -workpass -workqueues -workspaces -worktree -would've -wrapjdbcobjects -writetimeoutmillis -WSL -wslpath -wtf -wtfpl -www -wwwrun -Wzf -xargs -xcb -xcconfig -xcdd -xchm -xclick -xclip -xcode -xcodebuild -xcodeproj -xcp -xcsel -xcselv -xcworkspace -XDCHDSBDSDG -xdg -xdvi -xfn -xfree -xfs -xit -XIVIEWER -xjnmahqewy -xkcd -Xkten -XLBUFFER -xlbuflines -xml -xnode -xontab -xor -Xout -xperl -xphp -xpi -xpm -xpowered -xprop -xpython -XRBUFFER -xrbuflines -xruby -xsel -xshell -xstrat -xterm -XTRACE -xudmec -xunit -xvf -xvjf -xxd -xxdiff -Xxjn -xzcat -yaconf -yain -yainsd -yaloc -yalst -yamir -yaml -yandex -yandsearch -Yanovich -yaorph -yarem -yarep -yarnpkg -yarnrc -yasu -yaupd -yaupg -ybalrid -ycc -yesorno -yga -ygi -ygl -ygr -ygrm -ygu -yii -yiic -yiiframework -yireo -yleo -ylep -yli -yln -ylnf -yls -ymc -yml -yolo -Yonchu -YOSHIDA -yout -youtube -yrl -yrm -yrun -yst -ytc -yuc -yui -yuil -yuyuchu -yws -yyy -yzf -zadd -zake -zal -zall -zas -zbell -ZCA -zcard -zcl -zcompcache -zcompdump -zcompile -Zconvey -zcount -zcu -zcurses -zdbc -zdbcm -zdbm -zdbmigrate -zdbr -zdbreset -ZDgw -zdharma -zdirs -zdotdir -zdup -zenerate -zenmap -zerver -zfs -zgen -zgrep -zhimingwang -zhse -zic -zif -zin -zincrby -zinit -zinr -zinterstore -zipalign -zipfile -zkat -zle -zleparameter -zlicenses -zll -zlogin -zlogout -zlp -zlr -zls -zlu -zma -zmodload -zmr -zms -znr -znt -zocmez -zonsole -zoxide -zpa -zparseopts -zpatch -zpattern -zpch -zpchk -zpd -zplg -zplug -zplugin -zproduct -zprofile -zps -zpt -zrake -zrange -zrangebyscore -zrank -zref -zregexparse -zrem -zremrangebyrank -zremrangebyscore -zrevrange -zrevrangebyscore -zrevrank -zrl -zrm -zrn -zrr -zrs -zscore -zse -zsh -zsh'ed -zshaddhistory -zshcmd -zshcommands -zshcompfunc -zshconfig -zshell -zshenv -zshexpn -zshids -zshrc -zshtheme -zshwiki -zshzle -zsi -zsocket -Zsolt -zsource -zspec -zsr -zsrc -zst -Zstandard -zstat -zstd -zstdcat -zstyle -zsw -ztart -ztos -zucumber -zunctional -zunionstore -zunits -zunner -zup -zutil -zvcmp -zve -zweep -zwip -ZWJ -zwp -zxvf -zyg -zypper -zzz diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt deleted file mode 100644 index 93dfa201c..000000000 --- a/.github/actions/spelling/patterns.txt +++ /dev/null @@ -1,73 +0,0 @@ -# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns - -# YouTube -https?://(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_]* -<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"] -\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]* -# Google Analytics -\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]* -# Google APIs -\bgoogleapis\.com/[a-z]+/v\d+/[a-z]+/[@./?=\w]+ -\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|) -# Google Calendar -\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+ -\w+\@group\.calendar\.google\.com\b -# Google DataStudio -\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|) -# The leading `/` here is as opposed to the `\b` above -# ... a short way to match `https://` or `http://` since most urls have one of those prefixes -# Google Docs -/docs\.google\.com/[a-z]+/d/(?:e/|)[0-9a-zA-Z_-]+/? -# Google Drive -\bdrive\.google\.com/file/d/[0-9a-zA-Z_?=]* -# Google Groups -\bgroups\.google\.com/(?:forum/#!|d/)(?:msg|topic)/[^/]+/[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+|) -# Google themes -themes\.googleusercontent\.com/static/fonts/[^/]+/v\d+/[^.]+. -# Google CDN -\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]* -# Goo.gl -/goo\.gl/[a-zA-Z0-9]+ -# Google Chrome Store -\bchrome\.google\.com/webstore/detail/\w*(?:/\w*|) -# Google Books -\bbooks\.google\.(?:\w{2,4})/books\?[-\w\d=&#.]* -# Google Fonts -\bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]* - -# GitHub SHAs -\bapi.github\.com/repos/[^/]+/[^/]+/[^/]+/[0-9a-f]+\b -(?:\[[0-9a-f]+\]\(https:/|)/(?:www\.|)github\.com/[^/]+/[^/]+(?:/[^/]+/[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|) -\bgithub\.com/[^/]+/[^/]+[@#][0-9a-f]+\b -# githubusercontent -/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]* -# gist github -/gist\.github\.com/[^/]+/[0-9a-f]+ -# git.io -\bgit\.io/[0-9a-zA-Z]+ -# GitHub JSON -"node_id": "[-a-zA-Z=;:/0-9+]*" -# Contributor -\[[^\]]+]\(https://github\.com/[^/]+\) -# GHSA -GHSA(?:-[0-9a-z]{4}){3} - -LS_COLORS=(["']).*?\g{-1} - -(\\?)%[a-zA-Z]+\g{-1}(?!%) - -# URL escaped characters -\%[0-9A-F]{2} -# hex digits including css/html color classes: -(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uU]?[lL]{0,2}|u\d+)\b - -# https://www.gnu.org/software/groff/manual/groff.html -# man troff content -\\f[BCIPR] - -# Compiler flags -[\t "'`=]-[LPWXY] -[\t "'`=]-D(?!ebian) - -# ignore long runs of a single character: -\b([A-Za-z])\g{-1}{3,}\b diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt deleted file mode 100644 index a5ba6f639..000000000 --- a/.github/actions/spelling/reject.txt +++ /dev/null @@ -1,7 +0,0 @@ -^attache$ -benefitting -occurence -Sorce -^[Ss]pae -^untill -^wether diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cdadc1434..50e00f9c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,10 @@ on: branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: tests: name: Run tests diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 800761554..4b671d449 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -5,6 +5,10 @@ on: pull_request_target: types: [opened, synchronize] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: add-to-project: name: Add to project @@ -18,6 +18,41 @@ To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://twi [![Gitpod ready](https://img.shields.io/badge/Gitpod-ready-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ohmyzsh/ohmyzsh) [![huntr.dev](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev/bounties/disclose/?utm_campaign=ohmyzsh%2Fohmyzsh&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fohmyzsh%2Fohmyzsh) +<details> +<summary>Table of Contents</summary> + +- [Getting Started](#getting-started) + - [Prerequisites](#prerequisites) + - [Basic Installation](#basic-installation) + - [Manual inspection](#manual-inspection) +- [Using Oh My Zsh](#using-oh-my-zsh) + - [Plugins](#plugins) + - [Enabling Plugins](#enabling-plugins) + - [Using Plugins](#using-plugins) + - [Themes](#themes) + - [Selecting a Theme](#selecting-a-theme) + - [FAQ](#faq) +- [Advanced Topics](#advanced-topics) + - [Advanced Installation](#advanced-installation) + - [Custom Directory](#custom-directory) + - [Unattended install](#unattended-install) + - [Installing from a forked repository](#installing-from-a-forked-repository) + - [Manual Installation](#manual-installation) + - [Installation Problems](#installation-problems) + - [Custom Plugins and Themes](#custom-plugins-and-themes) +- [Getting Updates](#getting-updates) + - [Manual Updates](#manual-updates) +- [Uninstalling Oh My Zsh](#uninstalling-oh-my-zsh) +- [How do I contribute to Oh My Zsh?](#how-do-i-contribute-to-oh-my-zsh) + - [Do NOT send us themes](#do-not-send-us-themes) +- [Contributors](#contributors) +- [Follow Us](#follow-us) +- [Merchandise](#merchandise) +- [License](#license) +- [About Planet Argon](#about-planet-argon) + +</details> + ## Getting Started ### Prerequisites @@ -32,7 +67,7 @@ To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://twi Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl`, `wget` or another similar tool. | Method | Command | -|:----------|:--------------------------------------------------------------------------------------------------| +| :-------- | :------------------------------------------------------------------------------------------------ | | **curl** | `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` | | **wget** | `sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` | | **fetch** | `sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` | @@ -82,7 +117,7 @@ _Note that the plugins are separated by whitespace (spaces, tabs, new lines...). #### Using Plugins -Each plugin includes a __README__, documenting it. This README should show the aliases (if the plugin adds any) and extra goodies that are included in that particular plugin. +Each plugin includes a **README**, documenting it. This README should show the aliases (if the plugin adds any) and extra goodies that are included in that particular plugin. ### Themes @@ -194,19 +229,19 @@ REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh #### Manual Installation -##### 1. Clone the repository +##### 1. Clone the repository <!-- omit in toc --> ```sh git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh ``` -##### 2. *Optionally*, backup your existing `~/.zshrc` file +##### 2. _Optionally_, backup your existing `~/.zshrc` file <!-- omit in toc --> ```sh cp ~/.zshrc ~/.zshrc.orig ``` -##### 3. Create a new zsh configuration file +##### 3. Create a new zsh configuration file <!-- omit in toc --> You can create a new zsh config file by copying the template that we have included for you. @@ -214,7 +249,7 @@ You can create a new zsh config file by copying the template that we have includ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc ``` -##### 4. Change your default shell +##### 4. Change your default shell <!-- omit in toc --> ```sh chsh -s $(which zsh) @@ -222,7 +257,7 @@ chsh -s $(which zsh) You must log out from your user session and log back in to see this change. -##### 5. Initialize your new zsh configuration +##### 5. Initialize your new zsh configuration <!-- omit in toc --> Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration. @@ -230,10 +265,8 @@ Once you open up a new terminal window, it should load zsh with Oh My Zsh's conf If you have any hiccups installing, here are a few common fixes. -- You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after -switching to `oh-my-zsh`. -- If you installed manually or changed the install location, check the `ZSH` environment variable in -`~/.zshrc`. +- You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after switching to `oh-my-zsh`. +- If you installed manually or changed the install location, check the `ZSH` environment variable in `~/.zshrc`. ### Custom Plugins and Themes diff --git a/lib/cli.zsh b/lib/cli.zsh index c2fba8556..bf783d9f3 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -573,12 +573,27 @@ function _omz::pr::test { # Rebase pull request branch against the current master _omz::log info "rebasing PR #$1..." - command git rebase --no-gpg-sign master ohmyzsh/pull-$1 || { - command git rebase --abort &>/dev/null - _omz::log warn "could not rebase PR #$1 on top of master." - _omz::log warn "you might not see the latest stable changes." - _omz::log info "run \`zsh\` to test the changes." - return 1 + local gpgsign + { + # Back up commit.gpgsign setting: use --local to get the current repository + # setting, not the global one. If --local is not a known option, it will + # exit with a 129 status code. + gpgsign=$(command git config --local commit.gpgsign 2>/dev/null) + [[ $? -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null) + command git config commit.gpgsign false + + command git rebase master ohmyzsh/pull-$1 || { + command git rebase --abort &>/dev/null + _omz::log warn "could not rebase PR #$1 on top of master." + _omz::log warn "you might not see the latest stable changes." + _omz::log info "run \`zsh\` to test the changes." + return 1 + } + } always { + case "$gpgsign" in + "") command git config --unset commit.gpgsign ;; + *) command git config commit.gpgsign "$gpgsign" ;; + esac } _omz::log info "fetch of PR #${1} successful." diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 4035d10a1..80ca7ef78 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -17,7 +17,7 @@ function title { : ${2=$1} case "$TERM" in - cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*|alacritty|st*) + cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*|alacritty|st*|foot) print -Pn "\e]2;${2:q}\a" # set window name print -Pn "\e]1;${1:q}\a" # set tab name ;; diff --git a/lib/vcs_info.zsh b/lib/vcs_info.zsh index 01dcd90b6..e60938c14 100644 --- a/lib/vcs_info.zsh +++ b/lib/vcs_info.zsh @@ -1,8 +1,11 @@ -# Impacted versions go from v5.0.3 to v5.8 (v5.8.1 is the first patched version) -autoload -Uz is-at-least -if is-at-least 5.8.1 || ! is-at-least 5.0.3; then - return -fi +# Don't skip this file until a Zsh release does the necessary quoting. +# This is because even though 5.8.1 undid recursive prompt_subst inside +# prompt sequences, % characters in relevant fields will still be rendered +# incorrectly in vcs_info, on all Zsh releases up to writing this. +# +# There is no release yet that does this right, since it requires changing +# how what vcs_info hooks expect to receive. Even so, I'd rather be correct +# and break custom vcs_info hooks than have a broken prompt. # Quote necessary $hook_com[<field>] items just before they are used # in the line "VCS_INFO_hook 'post-backend'" of the VCS_INFO_formats @@ -35,7 +38,7 @@ fi # due to malicious input as a consequence of CVE-2021-45444, which affects # zsh versions from 5.0.3 to 5.8. # -autoload -Uz +X regexp-replace VCS_INFO_formats +autoload -Uz +X regexp-replace VCS_INFO_formats 2>/dev/null || return # We use $tmp here because it's already a local variable in VCS_INFO_formats typeset PATCH='for tmp (base base-name branch misc revision subdir) hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"' diff --git a/plugins/1password/1password.plugin.zsh b/plugins/1password/1password.plugin.zsh index 9398b02b4..941523ca8 100644 --- a/plugins/1password/1password.plugin.zsh +++ b/plugins/1password/1password.plugin.zsh @@ -1,46 +1,9 @@ -if (( ${+commands[op]} )); then - eval "$(op completion zsh)" - compdef _op op -fi +# Do nothing if op is not installed +(( ${+commands[op]} )) || return -# opswd puts the password of the named service into the clipboard. If there's a -# one time password, it will be copied into the clipboard after 10 seconds. The -# clipboard is cleared after another 20 seconds. -function opswd() { - if [[ $# -lt 1 ]]; then - echo "Usage: opswd <service>" - return 1 - fi +# Load op completion +eval "$(op completion zsh)" +compdef _op op - local service=$1 - - # If not logged in, print error and return - op list users > /dev/null || return - - local password - # Copy the password to the clipboard - if ! password=$(op get item "$service" --fields password 2>/dev/null); then - echo "error: could not obtain password for $service" - return 1 - fi - - echo -n "$password" | clipcopy - echo "✔ password for $service copied to clipboard" - - # If there's a one time password, copy it to the clipboard after 5 seconds - local totp - if totp=$(op get totp "$service" 2>/dev/null) && [[ -n "$totp" ]]; then - sleep 10 && echo -n "$totp" | clipcopy - echo "✔ TOTP for $service copied to clipboard" - fi - - (sleep 20 && clipcopy </dev/null 2>/dev/null) &! -} - -function _opswd() { - local -a services - services=("${(@f)$(op list items --categories Login 2>/dev/null | op get item - --fields title 2>/dev/null)}") - [[ -z "$services" ]] || compadd -a -- services -} - -compdef _opswd opswd +# Load opswd function +autoload -Uz opswd diff --git a/plugins/1password/README.md b/plugins/1password/README.md index f6790ca8a..f6854da53 100644 --- a/plugins/1password/README.md +++ b/plugins/1password/README.md @@ -25,11 +25,14 @@ which service you want to get. For example, `opswd github.com` will put your GitHub password into your clipboard, and if a TOTP is available, it will be copied to the clipboard after 10 seconds. -> NOTE: you need to be logged in for `opswd` to work. See: +> NOTE: you need to be signed in for `opswd` to work. If you are using biometric unlock, +> 1Password CLI will automatically prompt you to sign in. See: > -> - [Sign in or out](https://support.1password.com/command-line/#sign-in-or-out) -> - [Session management](https://support.1password.com/command-line/#appendix-session-management) +> - [Get started with 1Password CLI 2: Sign in](https://developer.1password.com/docs/cli/get-started#sign-in) +> - [Sign in to your 1Password account manually](https://developer.1password.com/docs/cli/sign-in-manually) ## Requirements -- [1Password's command line utility](https://1password.com/downloads/command-line/). +- [1Password CLI 2](https://developer.1password.com/docs/cli/get-started#install) + + > NOTE: if you're using 1Password CLI 1, [see how to upgrade to CLI 2](https://developer.1password.com/docs/cli/upgrade). diff --git a/plugins/1password/_opswd b/plugins/1password/_opswd new file mode 100644 index 000000000..dbc094f87 --- /dev/null +++ b/plugins/1password/_opswd @@ -0,0 +1,19 @@ +#compdef opswd + +function _opswd() { + local -a services + services=("${(@f)$(op item list --categories Login --cache 2>/dev/null | awk 'NR != 1 { print $2 }')}") + [[ -z "$services" ]] || compadd -a -- services +} + +# TODO: 2022-03-26: Remove support for op CLI 1 +autoload -Uz is-at-least +is-at-least 2.0.0 $(op --version) || { + function _opswd() { + local -a services + services=("${(@f)$(op list items --categories Login 2>/dev/null | op get item - --fields title 2>/dev/null)}") + [[ -z "$services" ]] || compadd -a -- services + } +} + +_opswd "$@" diff --git a/plugins/1password/opswd b/plugins/1password/opswd new file mode 100644 index 000000000..57672807e --- /dev/null +++ b/plugins/1password/opswd @@ -0,0 +1,78 @@ +#autoload + +# opswd puts the password of the named service into the clipboard. If there's a +# one time password, it will be copied into the clipboard after 10 seconds. The +# clipboard is cleared after another 20 seconds. +function opswd() { + if [[ $# -lt 1 ]]; then + echo "Usage: opswd <service>" + return 1 + fi + + local service=$1 + + # If not logged in, print error and return + op user list > /dev/null || return + + local password + # Copy the password to the clipboard + if ! password=$(op item get "$service" --fields password 2>/dev/null); then + echo "error: could not obtain password for $service" + return 1 + fi + + echo -n "$password" | clipcopy + echo "✔ password for $service copied to clipboard" + + # If there's a one time password, copy it to the clipboard after 10 seconds + local totp + if totp=$(op item get --otp "$service" 2>/dev/null) && [[ -n "$totp" ]]; then + sleep 10 && echo -n "$totp" | clipcopy + echo "✔ TOTP for $service copied to clipboard" + fi + + (sleep 20 && clipcopy </dev/null 2>/dev/null) &! +} + +# TODO: 2022-03-26: Remove support for op CLI 1 +autoload -Uz is-at-least +is-at-least 2.0.0 $(op --version) || { + print -ru2 ${(%):-"%F{yellow}opswd: usage with op version $(op --version) is deprecated. Upgrade to CLI 2 and reload zsh. +For instructions, see https://developer.1password.com/docs/cli/upgrade.%f"} + + # opswd puts the password of the named service into the clipboard. If there's a + # one time password, it will be copied into the clipboard after 10 seconds. The + # clipboard is cleared after another 20 seconds. + function opswd() { + if [[ $# -lt 1 ]]; then + echo "Usage: opswd <service>" + return 1 + fi + + local service=$1 + + # If not logged in, print error and return + op list users > /dev/null || return + + local password + # Copy the password to the clipboard + if ! password=$(op get item "$service" --fields password 2>/dev/null); then + echo "error: could not obtain password for $service" + return 1 + fi + + echo -n "$password" | clipcopy + echo "✔ password for $service copied to clipboard" + + # If there's a one time password, copy it to the clipboard after 5 seconds + local totp + if totp=$(op get totp "$service" 2>/dev/null) && [[ -n "$totp" ]]; then + sleep 10 && echo -n "$totp" | clipcopy + echo "✔ TOTP for $service copied to clipboard" + fi + + (sleep 20 && clipcopy </dev/null 2>/dev/null) &! + } +} + +opswd "$@" diff --git a/plugins/autoenv/autoenv.plugin.zsh b/plugins/autoenv/autoenv.plugin.zsh index bd03cf4b2..229a8a834 100644 --- a/plugins/autoenv/autoenv.plugin.zsh +++ b/plugins/autoenv/autoenv.plugin.zsh @@ -13,6 +13,7 @@ if ! type autoenv_init >/dev/null; then ~/.autoenv ~/.local/bin /usr/local/opt/autoenv + /opt/homebrew/opt/autoenv /usr/local/bin /usr/share/autoenv-git ~/Library/Python/bin diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 920a7139d..b8625d7ac 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -158,7 +158,7 @@ compctl -K _aws_profiles asp acp aws_change_access_key # AWS prompt function aws_prompt_info() { [[ -n "$AWS_PROFILE" ]] || return - echo "${ZSH_THEME_AWS_PREFIX:=<aws:}${AWS_PROFILE:gs/%/%%}${ZSH_THEME_AWS_SUFFIX:=>}" + echo "${ZSH_THEME_AWS_PREFIX=<aws:}${AWS_PROFILE:gs/%/%%}${ZSH_THEME_AWS_SUFFIX=>}" } if [[ "$SHOW_AWS_PROMPT" != false && "$RPROMPT" != *'$(aws_prompt_info)'* ]]; then diff --git a/plugins/bazel/README.md b/plugins/bazel/README.md index e5ffe6ea1..fc375d219 100644 --- a/plugins/bazel/README.md +++ b/plugins/bazel/README.md @@ -1,5 +1,14 @@ -## Bazel autocomplete plugin +# Bazel plugin -A copy of the completion script from the -[bazelbuild/bazel](https://github.com/bazelbuild/bazel/master/scripts/zsh_completion/_bazel) -git repo. +This plugin adds completion for [bazel](https://bazel.build), an open-source build and +test tool that scalably supports multi-language and multi-platform projects. + +To use it, add `bazel` to the plugins array in your zshrc file: + +```zsh +plugins=(... bazel) +``` + +The plugin has a copy of [the completion script from the git repository][1]. + +[1]: https://github.com/bazelbuild/bazel/blob/master/scripts/zsh_completion/_bazel diff --git a/plugins/cargo/cargo.plugin.zsh b/plugins/cargo/cargo.plugin.zsh index e4b338207..692025e8f 100644 --- a/plugins/cargo/cargo.plugin.zsh +++ b/plugins/cargo/cargo.plugin.zsh @@ -1,14 +1,6 @@ print ${(%):-'%F{yellow}The `cargo` plugin is deprecated and has been moved to the `rust` plugin.'} print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'} -# TODO: 2021-12-28: remove this block -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" -# Remove old generated completion file -command rm -f "${0:A:h}/_cargo" "$ZSH_CACHE_DIR/cargo_version" - (( ${fpath[(Ie)$ZSH/plugins/rust]} )) || { fpath=("$ZSH/plugins/rust" $fpath) source "$ZSH/plugins/rust/rust.plugin.zsh" diff --git a/plugins/charm/README.md b/plugins/charm/README.md new file mode 100644 index 000000000..f237dceeb --- /dev/null +++ b/plugins/charm/README.md @@ -0,0 +1,9 @@ +# Charm plugin + +This plugin adds completion for the [charm](https://github.com/charmbracelet/charm) CLI. + +To use it, add `charm` to the plugins array in your zshrc file: + +```zsh +plugins=(... charm) +``` diff --git a/plugins/charm/charm.plugin.zsh b/plugins/charm/charm.plugin.zsh new file mode 100644 index 000000000..52361ce95 --- /dev/null +++ b/plugins/charm/charm.plugin.zsh @@ -0,0 +1,14 @@ +# Autocompletion for the Charm CLI (charm). +if (( ! $+commands[charm] )); then + return +fi + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `charm`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_charm" ]]; then + typeset -g -A _comps + autoload -Uz _charm + _comps[charm]=_charm +fi + +charm completion zsh >| "$ZSH_CACHE_DIR/completions/_charm" &| diff --git a/plugins/coffee/_coffee b/plugins/coffee/_coffee index 5e52b30e6..e2814f7ba 100644 --- a/plugins/coffee/_coffee +++ b/plugins/coffee/_coffee @@ -39,14 +39,14 @@ # # ------------------------------------------------------------------------------ -local curcontext="$curcontext" state line ret=1 version opts first second third +local curcontext="$curcontext" state line ret=1 version +local -a opts typeset -A opt_args -version=(${(f)"$(_call_program version $words[1] --version)"}) +version=(${(f)"$(_call_program version $words[1] --version)"}) || return ret version=${${(z)${version[1]}}[3]} -first=$(echo $version|cut -d '.' -f 1) -second=$(echo $version|cut -d '.' -f 2) -third=$(echo $version|cut -d '.' -f 3) -if (( $first < 2 )) && (( $second < 7 )) && (( $third < 3 ));then + +autoload -Uz is-at-least +if ! is-at-least 1.6.3 "$version"; then opts+=('(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]' '(-r --require)'{-r,--require}'[require a library before executing your script]:library') fi diff --git a/plugins/copydir/README.md b/plugins/copydir/README.md index 594bf1065..cf24b789f 100644 --- a/plugins/copydir/README.md +++ b/plugins/copydir/README.md @@ -1,10 +1,3 @@ # copydir plugin -Copies the path of your current folder to the system clipboard. - -To use, add `copydir` to your plugins array: -``` -plugins=(... copydir) -``` - -Then use the command `copydir` to copy the $PWD. +This plugin is deprecated. Use the [`copypath` plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copypath) instead. diff --git a/plugins/copydir/copydir.plugin.zsh b/plugins/copydir/copydir.plugin.zsh index c45106240..a2b489ec0 100644 --- a/plugins/copydir/copydir.plugin.zsh +++ b/plugins/copydir/copydir.plugin.zsh @@ -1,5 +1,7 @@ -# Copies the pathname of the current directory to the system or X Windows clipboard +echo ${(%):-'%F{yellow}The `%Bcopydir%b` plugin is deprecated. Use the `%Bcopypath%b` plugin instead.%f'} +source "$ZSH/plugins/copypath/copypath.plugin.zsh" + +# TODO: 2022-02-22: Remove deprecated copydir function. function copydir { - emulate -L zsh - print -n $PWD | clipcopy + copypath } diff --git a/plugins/copypath/README.md b/plugins/copypath/README.md new file mode 100644 index 000000000..1e5a463a6 --- /dev/null +++ b/plugins/copypath/README.md @@ -0,0 +1,15 @@ +# copypath plugin + +Copies the path of given directory or file to the system clipboard. + +To use it, add `copypath` to the plugins array in your zshrc file: + +```zsh +plugins=(... copypath) +``` + +## Usage + +- `copypath`: copies the absolute path of the current directory. + +- `copypath <file_or_directory>`: copies the absolute path of the given file. diff --git a/plugins/copypath/copypath.plugin.zsh b/plugins/copypath/copypath.plugin.zsh new file mode 100644 index 000000000..8fe0a85f4 --- /dev/null +++ b/plugins/copypath/copypath.plugin.zsh @@ -0,0 +1,15 @@ +# Copies the path of given directory or file to the system or X Windows clipboard. +# Copy current directory if no parameter. +function copypath { + # If no argument passed, use current directory + local file="${1:-.}" + + # If argument is not an absolute path, prepend $PWD + [[ $file = /* ]] || file="$PWD/$file" + + # Copy the absolute path without resolving symlinks + # If clipcopy fails, exit the function with an error + print -n "${file:a}" | clipcopy || return 1 + + echo ${(%):-"%B${file:a}%b copied to clipboard."} +} diff --git a/plugins/dash/dash.plugin.zsh b/plugins/dash/dash.plugin.zsh index ace2e33c1..f6801a870 100644 --- a/plugins/dash/dash.plugin.zsh +++ b/plugins/dash/dash.plugin.zsh @@ -1,80 +1,84 @@ # Usage: dash [keyword:]query -dash() { open dash://"$*" } +dash() { open -a Dash.app dash://"$*" } compdef _dash dash _dash() { # No sense doing this for anything except the 2nd position and if we haven't # specified which docset to query against - if [[ $CURRENT -eq 2 && ! "$words[2]" =~ ":" ]]; then - local -a _all_docsets - _all_docsets=() - # Use defaults to get the array of docsets from preferences - # Have to smash it into one big line so that each docset is an element of - # our DOCSETS array - DOCSETS=("${(@f)$(defaults read com.kapeli.dashdoc docsets | tr -d '\n' | grep -oE '\{.*?\}')}") + if [[ $CURRENT -ne 2 || "$words[2]" =~ ":" ]]; then + return + fi - # remove all newlines since defaults prints so pretty like - # Now get each docset and output each on their own line - for doc in "$DOCSETS[@]"; do - # Only output docsets that are actually enabled - if [[ "`echo $doc | grep -Eo \"isEnabled = .*?;\" | sed 's/[^01]//g'`" == "0" ]]; then - continue + local -aU docsets + docsets=() + + # Use defaults to get the array of docsets from preferences + # Have to smash it into one big line so that each docset is an element of our docsets array + # Only output docsets that are actually enabled + local -a enabled_docsets + enabled_docsets=("${(@f)$(defaults read com.kapeli.dashdoc docsets \ + | tr -d '\n' | grep -oE '\{.*?\}' | grep -E 'isEnabled = 1;')}") + + local docset name keyword + # Now get each docset and output each on their own line + for docset in "$enabled_docsets[@]"; do + keyword='' + # Order of preference as explained to me by @kapeli via email + for locator in keyword suggestedKeyword platform; do + # Echo the docset, try to find the appropriate keyword + # Strip doublequotes and colon from any keyword so that everything has the + # same format when output (we'll add the colon in the completion) + if [[ "$docset" =~ "$locator = ([^;]*);" ]]; then + keyword="${match[1]//[\":]}" fi - keyword='' + if [[ -z "$keyword" ]]; then + continue + fi - # Order of preference as explained to me by @kapeli via email - KEYWORD_LOCATORS=(keyword suggestedKeyword platform) - for locator in "$KEYWORD_LOCATORS[@]"; do - # Echo the docset, try to find the appropriate keyword - # Strip doublequotes and colon from any keyword so that everything has the - # same format when output (we'll add the colon in the completion) - keyword=`echo $doc | grep -Eo "$locator = .*?;" | sed -e "s/$locator = \(.*\);/\1/" -e "s/[\":]//g"` - if [[ ! -z "$keyword" ]]; then - # if we fall back to platform, we should do some checking per @kapeli - if [[ "$locator" == "platform" ]]; then - # Since these are the only special cases right now, let's not do the - # expensive processing unless we have to - if [[ "$keyword" = (python|java|qt|cocos2d) ]]; then - docsetName=`echo $doc | grep -Eo "docsetName = .*?;" | sed -e "s/docsetName = \(.*\);/\1/" -e "s/[\":]//g"` - case "$keyword" in - python) - case "$docsetName" in - "Python 2") keyword="python2" ;; - "Python 3") keyword="python3" ;; - esac ;; - java) - case "$docsetName" in - "Java SE7") keyword="java7" ;; - "Java SE6") keyword="java6" ;; - "Java SE8") keyword="java8" ;; - esac ;; - qt) - case "$docsetName" in - "Qt 5") keyword="qt5" ;; - "Qt 4"|Qt) keyword="qt4" ;; - esac ;; - cocos2d) - case "$docsetName" in - Cocos3D) keyword="cocos3d" ;; - esac ;; - esac - fi + # if we fall back to platform, we should do some checking per @kapeli + if [[ "$locator" == "platform" ]]; then + # Since these are the only special cases right now, let's not do the + # expensive processing unless we have to + if [[ "$keyword" = (python|java|qt|cocos2d) ]]; then + if [[ "$docset" =~ "docsetName = ([^;]*);" ]]; then + name="${match[1]//[\":]}" + case "$keyword" in + python) + case "$name" in + "Python 2") keyword="python2" ;; + "Python 3") keyword="python3" ;; + esac ;; + java) + case "$name" in + "Java SE7") keyword="java7" ;; + "Java SE6") keyword="java6" ;; + "Java SE8") keyword="java8" ;; + esac ;; + qt) + case "$name" in + "Qt 5") keyword="qt5" ;; + "Qt 4"|Qt) keyword="qt4" ;; + esac ;; + cocos2d) + case "$name" in + Cocos3D) keyword="cocos3d" ;; + esac ;; + esac fi - - # Bail once we have a match - break fi - done - - # If we have a keyword, add it to the list! - if [[ ! -z "$keyword" ]]; then - _all_docsets+=($keyword) fi + + # Bail once we have a match + break done - # special thanks to [arx] on #zsh for getting me sorted on this piece - compadd -qS: -- "$_all_docsets[@]" - return - fi + # If we have a keyword, add it to the list! + if [[ -n "$keyword" ]]; then + docsets+=($keyword) + fi + done + + # special thanks to [arx] on #zsh for getting me sorted on this piece + compadd -qS: -- "$docsets[@]" } diff --git a/plugins/deno/deno.plugin.zsh b/plugins/deno/deno.plugin.zsh index 6c12bae13..7708f84df 100644 --- a/plugins/deno/deno.plugin.zsh +++ b/plugins/deno/deno.plugin.zsh @@ -16,19 +16,6 @@ if (( ! $+commands[deno] )); then return fi -# TODO: 2021-12-28: remove this block -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" -# Remove old generated files -command rm -f "${0:A:h}/_deno" "$ZSH_CACHE_DIR/deno_version" - -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `deno`. Otherwise, compinit will have already done that. if [[ ! -f "$ZSH_CACHE_DIR/completions/_deno" ]]; then diff --git a/plugins/fnm/fnm.plugin.zsh b/plugins/fnm/fnm.plugin.zsh index 044e16a04..6219025cd 100644 --- a/plugins/fnm/fnm.plugin.zsh +++ b/plugins/fnm/fnm.plugin.zsh @@ -2,19 +2,6 @@ if (( ! $+commands[fnm] )); then return fi -# TODO: 2021-12-28: remove this block -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" -# remove old generated files -command rm -f "${0:A:h}/_fnm" "$ZSH_CACHE_DIR/fnm_version" - -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `fnm`. Otherwise, compinit will have already done that. if [[ ! -f "$ZSH_CACHE_DIR/completions/_fnm" ]]; then diff --git a/plugins/fzf/README.md b/plugins/fzf/README.md index 15d4d31f3..beedf4690 100644 --- a/plugins/fzf/README.md +++ b/plugins/fzf/README.md @@ -31,8 +31,8 @@ export FZF_DEFAULT_COMMAND='<your fzf default command>' If not set, the plugin will try to set it to these, in the order in which they're found: -- [`rg`](https://github.com/BurntSushi/ripgrep) - [`fd`](https://github.com/sharkdp/fd) +- [`rg`](https://github.com/BurntSushi/ripgrep) - [`ag`](https://github.com/ggreer/the_silver_searcher) ### `DISABLE_FZF_AUTO_COMPLETION` diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 102605958..a946cf762 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -173,6 +173,32 @@ function fzf_setup_using_cygwin() { return 0 } +function fzf_setup_using_macports() { + # If the command is not found, the package isn't installed + (( $+commands[fzf] )) || return 1 + + # The fzf-zsh-completion package installs the auto-completion in + local completions="/opt/local/share/zsh/site-functions/fzf" + # The fzf-zsh-completion package installs the key-bindings file in + local key_bindings="/opt/local/share/fzf/shell/key-bindings.zsh" + + if [[ ! -f "$completions" || ! -f "$key_bindings" ]]; then + return 1 + fi + + # Auto-completion + if [[ -o interactive && "$DISABLE_FZF_AUTO_COMPLETION" != "true" ]]; then + source "$completions" 2>/dev/null + fi + + # Key bindings + if [[ "$DISABLE_FZF_KEY_BINDINGS" != "true" ]]; then + source "$key_bindings" 2>/dev/null + fi + + return 0 +} + # Indicate to user that fzf installation not found if nothing worked function fzf_setup_error() { cat >&2 <<'EOF' @@ -185,16 +211,17 @@ fzf_setup_using_openbsd \ || fzf_setup_using_debian \ || fzf_setup_using_opensuse \ || fzf_setup_using_cygwin \ + || fzf_setup_using_macports \ || fzf_setup_using_base_dir \ || fzf_setup_error unset -f -m 'fzf_setup_*' if [[ -z "$FZF_DEFAULT_COMMAND" ]]; then - if (( $+commands[rg] )); then - export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"' - elif (( $+commands[fd] )); then + if (( $+commands[fd] )); then export FZF_DEFAULT_COMMAND='fd --type f --hidden --exclude .git' + elif (( $+commands[rg] )); then + export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git/*"' elif (( $+commands[ag] )); then export FZF_DEFAULT_COMMAND='ag -l --hidden -g "" --ignore .git' fi diff --git a/plugins/gh/gh.plugin.zsh b/plugins/gh/gh.plugin.zsh index 9263220ca..1d8d84c55 100644 --- a/plugins/gh/gh.plugin.zsh +++ b/plugins/gh/gh.plugin.zsh @@ -3,19 +3,6 @@ if (( ! $+commands[gh] )); then return fi -# TODO: 2021-12-28: remove this block -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" -# Remove old generated files -command rm -f "${0:A:h}/_gh" "$ZSH_CACHE_DIR/gh_version" - -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `gh`. Otherwise, compinit will have already done that. if [[ ! -f "$ZSH_CACHE_DIR/completions/_gh" ]]; then diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 0adc8de5d..1f4be20b0 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -9,7 +9,7 @@ autoload -U add-zsh-hook add-zsh-hook preexec _gpg-agent_update-tty_preexec # If enable-ssh-support is set, fix ssh agent integration -if [[ $(gpgconf --list-options gpg-agent | awk -F: '$1=="enable-ssh-support" {print $10}') = 1 ]]; then +if [[ $(gpgconf --list-options gpg-agent 2>/dev/null | awk -F: '$1=="enable-ssh-support" {print $10}') = 1 ]]; then unset SSH_AGENT_PID if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]]; then export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" diff --git a/plugins/helm/helm.plugin.zsh b/plugins/helm/helm.plugin.zsh index cadfa551a..151c43d88 100644 --- a/plugins/helm/helm.plugin.zsh +++ b/plugins/helm/helm.plugin.zsh @@ -2,21 +2,12 @@ if (( ! $+commands[helm] )); then return fi -# TODO: 2021-12-28: delete this block -# Remove old generated file -command rm -f "${ZSH_CACHE_DIR}/helm_completion" - -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file does not exist, generate it and then source it # Otherwise, source it and regenerate in the background if [[ ! -f "$ZSH_CACHE_DIR/completions/_helm" ]]; then - helm completion zsh >| "$ZSH_CACHE_DIR/completions/_helm" + helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null source "$ZSH_CACHE_DIR/completions/_helm" else source "$ZSH_CACHE_DIR/completions/_helm" - helm completion zsh >| "$ZSH_CACHE_DIR/completions/_helm" &| + helm completion zsh | tee "$ZSH_CACHE_DIR/completions/_helm" >/dev/null &| fi diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index f6651c8cd..579a90b3b 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -22,7 +22,7 @@ plugins=(... kubectl) | kcsc | `kubectl config set-context` | Set a context entry in kubeconfig | | kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig | | kccc | `kubectl config current-context` | Display the current-context | -| kcgc | `kubectl config get-contexts` | List of contexts available +| kcgc | `kubectl config get-contexts` | List of contexts available | | | | **General aliases** | | kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector | | kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument | @@ -71,9 +71,11 @@ plugins=(... kubectl) | kdeld | `kubectl delete deployment` | Delete the deployment | | ksd | `kubectl scale deployment` | Scale a deployment | | krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment | -| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime | +| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime | | | | **Rollout management** | -| kgrs | `kubectl get rs` | To see the ReplicaSet `rs` created by the deployment | +| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment | +| kdrs | `kubectl describe replicaset` | Describe ReplicaSet in detail | +| kers | `kubectl edit replicaset` | Edit ReplicaSet from the default editor | | krh | `kubectl rollout history` | Check the revisions of this deployment | | kru | `kubectl rollout undo` | Rollback to the previous revision | | | | **Port forwarding** | @@ -120,6 +122,11 @@ plugins=(... kubectl) | kecj | `kubectl edit cronjob` | Edit CronJob from the default editor | | kdcj | `kubectl describe cronjob` | Describe a CronJob in details | | kdelcj | `kubectl delete cronjob` | Delete the CronJob | +| | | **Job management** | +| kgj | `kubectl get job` | List all Job in ps output format | +| kej | `kubectl edit job` | Edit a Job in details | +| kdj | `kubectl describe job` | Describe the Job | +| kdelj | `kubectl delete job` | Delete the Job | ## Wrappers diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index eed5727d1..095d2b328 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -1,21 +1,12 @@ if (( $+commands[kubectl] )); then - # TODO: 2022-01-05: remove this block - # remove old generated files - command rm -f "$ZSH_CACHE_DIR/kubectl_completion" - - # TODO: 2022-01-05: remove this bit of code as it exists in oh-my-zsh.sh - # Add completions folder in $ZSH_CACHE_DIR - command mkdir -p "$ZSH_CACHE_DIR/completions" - (( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file does not exist, generate it and then source it # Otherwise, source it and regenerate in the background if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then - kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl" + kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null source "$ZSH_CACHE_DIR/completions/_kubectl" else source "$ZSH_CACHE_DIR/completions/_kubectl" - kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl" &| + kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null &| fi fi @@ -112,7 +103,9 @@ function kres(){ } # Rollout management. -alias kgrs='kubectl get rs' +alias kgrs='kubectl get replicaset' +alias kdrs='kubectl describe replicaset' +alias kers='kubectl edit replicaset' alias krh='kubectl rollout history' alias kru='kubectl rollout undo' @@ -178,6 +171,12 @@ alias kecj='kubectl edit cronjob' alias kdcj='kubectl describe cronjob' alias kdelcj='kubectl delete cronjob' +# Job management. +alias kgj='kubectl get job' +alias kej='kubectl edit job' +alias kdj='kubectl describe job' +alias kdelj='kubectl delete job' + # Only run if the user actually has kubectl installed if (( ${+_comps[kubectl]} )); then function kj() { kubectl "$@" -o json | jq; } diff --git a/plugins/rails/README.md b/plugins/rails/README.md index efdb8f8ba..fa66750f0 100644 --- a/plugins/rails/README.md +++ b/plugins/rails/README.md @@ -1,6 +1,7 @@ # Rails -This plugin adds completion for [Ruby On Rails Framework](https://rubyonrails.org/) and [Rake](https://ruby.github.io/rake/) commands, as well as some aliases for logs and environment variables. +This plugin adds completion for [Ruby On Rails Framework](https://rubyonrails.org/) and +[Rake](https://ruby.github.io/rake/) commands, as well as some aliases for logs and environment variables. To use it, add `rails` to the plugins array in your zshrc file: @@ -12,47 +13,52 @@ plugins=(... rails) ### Rails aliases -| Alias | Command | Description | -|-------|----------------------------|----------------------------------------------------| -| `rc` | `rails console` | Interact with your Rails app from the CLI | -| `rcs` | `rails console --sandbox` | Test code in a sandbox, without changing any data | -| `rd` | `rails destroy` | Undo a generate operation | -| `rdb` | `rails dbconsole` | Interact with your db from the console | -| `rgen`| `rails generate` | Generate boilerplate code | -| `rgm` | `rails generate migration` | Generate a db migration | -| `rp` | `rails plugin` | Run a Rails plugin command | -| `rr` | `rails routes` | List all defined routes | -| `rrg` | `rails routes \| grep` | List and filter the defined routes | -| `ru` | `rails runner` | Run Ruby code in the context of Rails | -| `rs` | `rails server` | Launch a web server | -| `rsd` | `rails server --debugger` | Launch a web server with debugger | -| `rsp` | `rails server --port` | Launch a web server and specify the listening port | +| Alias | Command | Description | +| ------- | -------------------------------- | ------------------------------------------------------ | +| `rc` | `rails console` | Interact with your Rails app from the CLI | +| `rcs` | `rails console --sandbox` | Test code in a sandbox, without changing any data | +| `rd` | `rails destroy` | Undo a generate operation | +| `rdb` | `rails dbconsole` | Interact with your db from the console | +| `rdc` | `rails db:create` | Create the database | +| `rdd` | `rails db:drop` | Delete the database | +| `rdm` | `rails db:migrate` | Run pending db migrations | +| `rdmd` | `rails db:migrate:down` | Undo specific db migration | +| `rdmr` | `rails db:migrate:redo` | Redo specific db migration | +| `rdms` | `rails db:migrate:status` | Show current db migration status | +| `rdmtc` | `rails db:migrate db:test:clone` | Run pending migrations and clone db into test database | +| `rdmu` | `rails db:migrate:up` | Run specific db migration | +| `rdr` | `rails db:rollback` | Roll back the last migration | +| `rdrs` | `rails db:reset` | Delete the database and set it up again | +| `rds` | `rails db:seed` | Seed the database | +| `rdsl` | `rails db:schema:load` | Load the database schema | +| `rdtc` | `rails db:test:clone` | Clone the database into the test database | +| `rdtp` | `rails db:test:prepare` | Duplicate the db schema into your test database | +| `rgen` | `rails generate` | Generate boilerplate code | +| `rgm` | `rails generate migration` | Generate a db migration | +| `rlc` | `rails log:clear` | Clear Rails logs | +| `rmd` | `rails middleware` | Interact with Rails middlewares | +| `rn` | `rails notes` | Search for notes (`FIXME`, `TODO`) in code comments | +| `rp` | `rails plugin` | Run a Rails plugin command | +| `rr` | `rails routes` | List all defined routes | +| `rrg` | `rails routes \| grep` | List and filter the defined routes | +| `rs` | `rails server` | Launch a web server | +| `rsb` | `rails server --bind` | Launch a web server binding it to a specific IP | +| `rsd` | `rails server --debugger` | Launch a web server with debugger | +| `rsp` | `rails server --port` | Launch a web server and specify the listening port | +| `rsts` | `rails stats` | Print code statistics | +| `rt` | `rails test` | Run Rails tests | +| `ru` | `rails runner` | Run Ruby code in the context of Rails | -### Rake aliases +### Foreman -| Alias | Command | Description | -|---------|---------------------------------|--------------------------------------------------------| -| `rdm` | `rake db:migrate` | Run pending db migrations | -| `rdms` | `rake db:migrate:status` | Show current db migration status | -| `rdmtc` | `rake db:migrate db:test:clone` | Run pending migrations and clone db into test database | -| `rdr` | `rake db:rollback` | Roll back the last migration | -| `rdc` | `rake db:create` | Create the database | -| `rds` | `rake db:seed` | Seed the database | -| `rdd` | `rake db:drop` | Delete the database | -| `rdrs` | `rake db:reset` | Delete the database and set it up again | -| `rdtc` | `rake db:test:clone` | Clone the database into the test database | -| `rdtp` | `rake db:test:prepare` | Duplicate the db schema into your test database | -| `rdsl` | `rake db:schema:load` | Load the database schema | -| `rlc` | `rake log:clear` | Clear Rails logs | -| `rn` | `rake notes` | Search for notes (`FIXME`, `TODO`) in code comments | -| `rt` | `rake test` | Run Rails tests | -| `rmd` | `rake middleware` | Interact with Rails middlewares | -| `rsts` | `rake stats` | Print code statistics | +| Alias | Command | Description | +| ------ | --------------- | ----------------------------------------- | +| `fmns` | `foreman start` | Interact with your Rails app from the CLI | ### Utility aliases | Alias | Command | Description | -|-----------|-------------------------------|------------------------------------------------| +| --------- | ----------------------------- | ---------------------------------------------- | | `devlog` | `tail -f log/development.log` | Show and follow changes to the development log | | `prodlog` | `tail -f log/production.log` | Show and follow changes to the production log | | `testlog` | `tail -f log/test.log` | Show and follow changes to the test log | @@ -60,7 +66,7 @@ plugins=(... rails) ### Environment settings | Alias | Command | Description | -|-------|-------------------------|---------------------------------| +| ----- | ----------------------- | ------------------------------- | | `RED` | `RAILS_ENV=development` | Sets `RAILS_ENV` to development | | `REP` | `RAILS_ENV=production` | Sets `RAILS_ENV` to production | | `RET` | `RAILS_ENV=test` | Sets `RAILS_ENV` to test | @@ -68,15 +74,45 @@ plugins=(... rails) These are global aliases. Use in combination with a command or just run them separately. For example: `REP rake db:migrate` will migrate the production db. -### Legacy stuff +## Legacy + +### Rake aliases + +The following commands are run [using `rails` instead of `rake` since Rails v5][1], but are preserved under the +prefix `rk` for backwards compatibility. + +[1]: https://guides.rubyonrails.org/v5.2/command_line.html#bin-rails + +| Alias | Command | Description | +| -------- | ------------------------------- | ------------------------------------------------------ | +| `rkdc` | `rake db:create` | Create the database | +| `rkdd` | `rake db:drop` | Delete the database | +| `rkdm` | `rake db:migrate` | Run pending db migrations | +| `rkdms` | `rake db:migrate:status` | Show current db migration status | +| `rkdmtc` | `rake db:migrate db:test:clone` | Run pending migrations and clone db into test database | +| `rkdr` | `rake db:rollback` | Roll back the last migration | +| `rkdrs` | `rake db:reset` | Delete the database and set it up again | +| `rkds` | `rake db:seed` | Seed the database | +| `rkdsl` | `rake db:schema:load` | Load the database schema | +| `rkdtc` | `rake db:test:clone` | Clone the database into the test database | +| `rkdtp` | `rake db:test:prepare` | Duplicate the db schema into your test database | +| `rklc` | `rake log:clear` | Clear Rails logs | +| `rkmd` | `rake middleware` | Interact with Rails middlewares | +| `rkn` | `rake notes` | Search for notes (`FIXME`, `TODO`) in code comments | +| `rksts` | `rake stats` | Print code statistics | +| `rkt` | `rake test` | Run Rails tests | + +### Other | Alias | Command | -|---------|------------------------------------| -| `sstat` | `thin --stats "/thin/stats" start` | -| `sg` | `ruby script/generate` | +| ------- | ---------------------------------- | +| `sc` | `ruby script/console` | | `sd` | `ruby script/destroy` | +| `sd` | `ruby script/server --debugger` | +| `sg` | `ruby script/generate` | | `sp` | `ruby script/plugin` | | `sr` | `ruby script/runner` | | `ssp` | `ruby script/spec` | -| `sc` | `ruby script/console` | -| `sd` | `ruby script/server --debugger` | +| `sstat` | `thin --stats "/thin/stats" start` | + +- `remote_console <server> <directory>`: runs `ruby script/console production` on a remote server. diff --git a/plugins/rails/_rails b/plugins/rails/_rails index ad7505506..6dc85d458 100644 --- a/plugins/rails/_rails +++ b/plugins/rails/_rails @@ -1,66 +1,624 @@ #compdef rails -#autoload - -local -a _1st_arguments -_1st_arguments=( - 'generate:Generate new code (short-cut alias: "g")' - 'console:Start the Rails console (short-cut alias: "c")' - 'server:Start the Rails server (short-cut alias: "s")' - 'dbconsole:Start a console for the database specified in config/database.yml (short-cut alias: "db")' - 'new:Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app"' - 'application:Generate the Rails application code' - 'destroy:Undo code generated with "generate"' - - 'benchmarker:See how fast a piece of code runs' - 'profiler:Get profile information from a piece of code' - 'plugin:Install a plugin' - - 'plugin new:Generates skeleton for developing a Rails plugin' - 'runner:Run a piece of code in the application environment (short-cut alias: "r")' -) - -_rails_generate_arguments() { - generate_arguments=( - assets - controller - decorator - generator - helper - integration_test - mailer - migration - model - observer - performance_test - plugin - resource - scaffold - scaffold_controller - session_migration - stylesheets - task - ) -} - - -_arguments \ - '(--version)--version[show version]' \ - '(--help)--help[show help]' \ - '*:: :->subcmds' && return 0 - -if (( CURRENT == 1 )); then - _describe -t commands "rails subcommand" _1st_arguments - return -else - _files - return -fi - -case "$words[1]" in - g|generate) - _rails_generate_arguments - _wanted generate_arguments expl 'all generate' compadd -a generate_arguments ;; - d|destroy) - _rails_generate_arguments - _wanted generate_arguments expl 'all generate' compadd -a generate_arguments ;; -esac +# ------------------------------------------------------------------------------ +# 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 Ruby on Rails (http://rubyonrails.org/). +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Kazuya Takeshima (https://github.com/mitukiii) +# +# ------------------------------------------------------------------------------ + + +_rails() { + local context state line curcontext="$curcontext" + + if (( CURRENT > 2 )); then + (( CURRENT-- )) + shift words + _call_function - "_rails_${words[1]}" || _nothing + else + __rails_commands + fi +} + +__rails_commands() { + local context state line curcontext="$curcontext" + + local -a rails_options + __rails_setup_rails_options + + _arguments -C \ + $rails_options \ + ': :->command' + + case "$state" in + command) + local -a commands + local application_directory + __rails_setup_application_directory + + if [ -n "$application_directory" ]; then + commands=( + {generate,g}'[Generate new code]' + {console,c}'[Start the Rails console]' + {server,s}'[Start the Rails server]' + {dbconsole,db}'[Start a console for the database specified in config/database.yml]' + application'[Generate the Rails application code]' + {destroy,d}'[Undo code generated with "generate"]' + benchmarker'[See how fast a piece of code runs]' + profiler'[Get profile information from a piece of code]' + plugin'[Install a plugin]' + {runner,r}'[Run a piece of code in the application environment]' + {test,t}'[Run tests]' + ) + else + commands=( + new'[Create a new Rails application]' + ) + fi + + _values 'command' $commands + ;; + esac +} + +__rails_setup_application_directory() { + application_directory="$(pwd)" + + while [ -n "$application_directory" ]; do + if [ -f "${application_directory}/script/rails" -o -f "${application_directory}/bin/rails" ]; then + return + fi + application_directory="${application_directory%/*}" + done + + application_directory= +} + +__rails_setup_rails_options() { + rails_options=( + {-h,--help}'[Show this help message and quit]' + {-v,--version}'[Show Rails version number and quit]' + ) +} + +__rails_setup_runtime_options() { + runtime_options=( + '(-f --force)'{-f,--force}'[Overwrite files that already exist]' + '(-p --pretend)'{-p,--pretend}'[Run but do not make any changes]' + '(-q --quiet)'{-q,--quiet}'[Suppress status output]' + '(-s --skip)'{-s,--skip}'[Skip files that already exist]' + ) +} + +__rails_setup_generators_options() { + local -a runtime_options + __rails_setup_runtime_options + + generators_options=( + $runtime_options + --skip-namespace'[Skip namespace (affects only isolated applications)]' + --old-style-hash"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]" + ) +} + +__rails_setup_model_generators_options() { + local -a generators_options + __rails_setup_generators_options + + model_generators_options=( + $generators_options + '(-o --orm)'{-o,--orm=}'[Orm to be invoked]:orm' + ) +} + +__rails_setup_resource_generators_options() { + local -a model_generators_options + __rails_setup_model_generators_options + + resource_generators_options=( + $model_generators_options + --force-plural'[Forces the use of a plural ModelName]' + --resource-route'[Indicates when to generate resource route]: :__rails_boolean' + ) +} + +__rails_boolean() { + _values 'boolean' 'true' 'false' +} + +__rails_migration_fields() { + if compset -P '*:*:'; then + _values 'index' 'index' 'uniq' + else + if compset -P '*:'; then + _values -s ':' 'type' 'string' 'text' 'integer' 'float' 'decimal' 'datetime' 'timestamp' 'time' 'date' 'binary' 'boolean' 'references' + else + _guard '[[:alnum:]_]#' 'field' + fi + fi +} + +_rails_generate() { + local context state line curcontext="$curcontext" + + if (( CURRENT > 2 )); then + (( CURRENT-- )) + shift words + _call_function - "_rails_generate_${words[1]}" || _rails_generate_default + else + __rails_generate_commands + fi +} + +_rails_g() { + _rails_generate +} + +__rails_generate_commands() { + local context curcontext="$curcontext" update_policy + + zstyle -s ":completion:${curcontext}:" cache-policy update_policy + if [ -z "$update_policy" ]; then + zstyle ":completion:${curcontext}:" cache-policy _rails_generate_commands_caching_policy + fi + + local application_directory + __rails_setup_application_directory + local cache_name + cache_name="rails/${application_directory##*/}/all_generators" + if ! _retrieve_cache ${cache_name}; then + local -a all_generators + all_generators=($(_call_program rails_generators rails generate 2> /dev/null | awk '/^ [a-zA-Z_]+/{ print $1 }')) + _store_cache ${cache_name} all_generators + fi + + local -a rails_generators + rails_generators=(${all_generators:#*:*}) + _describe -t rails_generators 'rails generator' rails_generators + + local -a -U namespaces + local namespace + local -a generators + namespaces=(${(R)${(M)all_generators:#*:*}%:*}) + for namespace in $namespaces; do + generators=(${${(M)all_generators:#${namespace}:*}/:/\\:}) + _describe -t ${namespace}_generators "${namespace/_/ } generator" generators + done +} + +_rails_generate_commands_caching_policy() { + local application_directory + __rails_setup_application_directory + + if [ "${application_directory}/Gemfile" -nt "$1" ]; then + return 0 + fi + + local -a oldp + oldp=( "$1"(Nmw+1) ) + (( $#oldp )) +} + +_rails_generate_default() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + '*:argument' +} + +_rails_generate_assets() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + '(-j --javascripts)'{-j,--javascripts}'[Generate JavaScripts]: :__rails_boolean' \ + '(-y --stylesheets)'{-y,--stylesheets}'[Generate Stylesheets]: :__rails_boolean' \ + '(-je --javascript-engine)'{-je,--javascript-engine=}'[Engine for JavaScripts]:javascript engine' \ + '(-se --stylesheet-engine)'{-se,--stylesheet-engine=}'[Engine for Stylesheets]:stylesheet engine' \ + ': :_guard "^-*" "name"' +} + +_rails_generate_controller() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \ + '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \ + --helper'[Indicates when to generate helper]: :__rails_boolean' \ + --assets'[Indicates when to generate assets]: :__rails_boolean' \ + ': :_guard "^-*" "name"' \ + '*: :_guard "^-*" "action"' +} + +_rails_generate_generator() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + --namespace'[Namespace generator under lib/generators/name]: :__rails_boolean' \ + ': :_guard "^-*" "name"' +} + +_rails_generate_helper() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \ + ': :_guard "^-*" "name"' \ +} + +_rails_generate_integration_test() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + --integration-tool='[Integration tool to be invoke]:integration tool' \ + ': :_guard "^-*" "name"' \ +} + +_rails_generate_jbuilder() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + ': :_guard "^-*" "name"' \ + '*: :__rails_migration_fields' +} + +_rails_generate_mailer() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \ + '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \ + ': :_guard "^-*" "name"' \ + '*: :_guard "^-*" "method"' +} + +_rails_generate_migration() { + local -a modelgenerators_options + __rails_setup_model_generators_options + + _arguments \ + $model_generators_options \ + ': :_guard "^-*" "name"' \ + '*: :__rails_migration_fields' +} + +_rails_generate_model() { + _rails_generate_migration +} + +_rails_generate_observer() { + local -a model_generators_options + __rails_setup_model_generators_options + + _arguments \ + $model_generators_options \ + ': :_guard "^-*" "name"' +} + +_rails_generate_performance_test() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + --performance-tool='[Performance tool to be invoked]:performance tool' \ + ': :_guard "^-*" "name"' \ +} + +_rails_generate_resource() { + local context state line curcontext="$curcontext" + + local -a resource_generators_options + __rails_setup_resource_generators_options + + _arguments -C \ + $resource_generators_options \ + '(-c --resource-controller)'{-c,--resource-controller=}'[Resource controller to be invoked]:name' \ + '(-a --actions)'{-a,--actions=}'[Actions for the resource controller]: :->actions' \ + ': :->name' \ + '*: :->fields' + + if (( words[(I)(--actions=*|-a)] > 0 && words[(I)(--actions=*|-a)] == words[(I)-*] )); then + state=actions + fi + + case "$state" in + actions) + _guard "[[:alnum:]_]#" "actions" + ;; + name) + _guard "^-*" "name" + ;; + fields) + __rails_migration_fields + ;; + esac +} + +_rails_generate_scaffold() { + local -a resource_generators_options + __rails_setup_resource_generators_options + + _arguments \ + $resource_generators_options \ + '(-y --stylesheets)'{-y,--stylesheets}'[Generate Stylesheets]: :__rails_boolean' \ + '(-se --stylesheet-engine)'{-se,--stylesheet-engine=}'[Engine for Stylesheets]:stylesheet engine' \ + '(-c --scaffold-controller)'{-c,--scaffold-controller=}'[Scaffold controller to be invoked]:name' \ + --assets'[Indicates when to generate assets]:boolean:(true false)' \ + ': :_guard "^-*" "name"' \ + '*: :__rails_migration_fields' +} + +_rails_generate_scaffold_controller() { + local -a model_generators_options + __rails_setup_model_generators_options + + _arguments \ + $model_generators_options \ + '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \ + '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \ + --helper'[Indicates when to generate helper]: :__rails_boolean' \ + ': :_guard "^-*" "name"' +} + +_rails_generate_session_migration() { + local -a model_generators_options + __rails_setup_model_generators_options + + _arguments \ + $model_generators_options \ + ': :_guard "^-*" "name"' +} + +_rails_generate_task() { + local -a generators_options + __rails_setup_generators_options + + _arguments \ + $generators_options \ + ': :_guard "^-*" "name"' \ + '*: :_guard "^-*" "action"' +} + +_rails_console() { + _arguments \ + '(- *)'{-h,--help}'[Show this help message]' \ + '(-s --sandbox)'{-s,--sandbox}'[Rollback database modifications on exit]' \ + --debugger'[Enable ruby-debugging for the console]' +} + +_rails_c() { + _rails_console +} + +_rails_server() { + _arguments \ + '(- *)'{-h,--help}'[Show this help message]' \ + '(-p --port)'{-p,--port=}'[Runs Rails on the specified port]: :_guard "[[\:digit\:]]#" "port"' \ + '(-b --binding)'{-b,--binding=}'[Binds Rails to the specified ip]:ip:_hosts' \ + '(-c --config)'{-c,--config=}'[Use custom rackup configuration file]:file:_files -g "*.ru"' \ + '(-d --daemon)'{-d,--daemon}'[Make server run as a Daemon]' \ + '(-u --debugger)'{-u,--debugger}'[Enable ruby-debugging for the server]' \ + '(-e --environment)'{-e,--environment=}'[Specifies the environment to run this server under (test/development/production)]:name:(test development production)' \ + '(-P --pid)'{-P,--pid=}'[Specifies the PID file]:pid:_files -g "*.pid"' +} + +_rails_s() { + _rails_server +} + +_rails_dbconsole() { + _arguments \ + '(- *)'--help'[Show this help message]' \ + '(-p --include-password)'{-p,--include-password}'[Automatically provide the password from database.yml]' \ + --mode'[Automatically put the sqlite3 database in the specified mode (html, list, line, column)]:mode:(html list line column)' \ + --header +} + +_rails_new() { + local context state line curcontext="$curcontext" + + local _a rails_options runtime_options + __rails_setup_rails_options + __rails_setup_runtime_options + + _arguments -C \ + $rails_options \ + $runtime_options \ + '(-r --ruby)'{-r,--ruby=}'[Path to the Ruby binary of your choice]:path' \ + '(-b --builder)'{-b,--builder=}'[Path to a application builder (can be a filesystem path or URL)]: :->path_or_url' \ + '(-m --template)'{-m,--template=}'[Path to an application template (can be a filesystem path or URL)]: :->path_or_url' \ + --skip-gemfile"[Don't create a Gemfile]" \ + --skip-bundle"[Don't run bundle install]" \ + '(-G --skip-git)'{-G,--skip-git}'[Skip Git ignores and keeps]' \ + '(-O --skip-active-record)'{-O,--skip-active-record}'[Skip Active Record files]' \ + '(-S --skip-sprockets)'{-S,--skip-sprockets}'[Skip Sprockets files]' \ + '(-d --database)'{-d,--database=}'[Preconfigure for selected database]:database:(mysql oracle postgresql sqlite3 frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc)' \ + '(-j --javascript)'{-j,--javascript=}'[Preconfigure for selected JavaScript library]:javascript' \ + '(-J --skip-javascript)'{-J,--skip-javascript}'[Skip JavaScript files]' \ + --dev'[Setup the application with Gemfile pointing to your Rails checkout]' \ + --edge'[Setup the application with Gemfile pointing to Rails repository]' \ + '(-T --skip-test-unit)'{-T,--skip-test-unit}'[Skip Test::Unit files]' \ + --old-style-hash"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]" \ + ':app path:_directories' + + case "$state" in + path_or_url) + _alternative \ + 'files:path:_files -g "*.rb"' \ + 'url:url:_urls' + ;; + esac +} + +_rails_application() { + _rails_new +} + +_rails_db() { + _rails_dbconsole +} + +_rails_destroy() { + _rails_generate +} + +_rails_d() { + _rails_destroy +} + +_rails_benchmarker() { + _arguments \ + '(- *)'{-h,--help}'[Show this help message]' \ + '(-r --runs)'{-r,--runs}'[Number of runs]: :_guard "[[\:digit\:]]#" "number"' \ + '(-o --output)'{-o,--output}'[Directory to use when writing the results]:directory:_directories' \ + '(-m --metrics)'{-m,--metrics}'[Metrics to use]: :_values -s "," "metrics" "wall_time" "memory" "objects" "gc_runs" "gc_time"' \ + '*: :_guard "^-*" "ruby code"' +} + +_rails_profiler() { + _arguments \ + '(- *)'{-h,--help}'[Show this help message]' \ + '(-r --runs)'{-r,--runs}'[Number of runs]: :_guard "[[\:digit\:]]#" "number"' \ + '(-o --output)'{-o,--output}'[Directory to use when writing the results]:directory:_directories' \ + '(-m --metrics)'{-m,--metrics}'[Metrics to use]: :_values -s "," "metrics" "process_time" "memory" "objects"' \ + '(-f --formats)'{-f,--formats}'[Formats to output to]: :_values -s "," "formats" "flat" "graph" "html" "call_tree" "call_stack"' \ + '*: :_guard "^-*" "ruby code"' +} + +_rails_plugin() { + local context state line curcontext="$curcontext" + + if (( CURRENT > 2 )); then + (( CURRENT-- )) + shift words + _call_function - "_rails_plugin_${words[1]}" || _nothing + else + __rails_plugin_commands + fi +} + +__rails_plugin_commands() { + _values 'plugin command' \ + install'[Install plugin(s) from known repositories or URLs]' \ + remove'[Uninstall plugins]' \ + new +} + +_rails_plugin_install() { + _arguments \ + '(-x --externals)'{-x,--externals}'[Use svn:externals to grab the plugin. Enables plugin updates and plugin versioning]' \ + '(-o --checkout)'{-o,--checkout}'[Use svn checkout to grab the plugin. Enables updating but does not add a svn:externals entry]' \ + '(-e --export)'{-e,--export}'[Use svn export to grab the plugin. Exports the plugin, allowing you to check it into your local repository. Does not enable updates or add an svn:externals entry]' \ + '(-q --quiet)'{-q,--quiet}'[Suppresses the output from installation. Ignored if -v is passed (rails plugin -v install ...)]' \ + '(-r --revision)'{-r,--revision=}'[Checks out the given revision from subversion or git. Ignored if subversion/git is not used]:revision' \ + '(-f --force)'{-f,--force}"[Reinstalls a plugin if it's already installed]" \ + '*:plugin:_urls' +} + +_rails_plugin_remove() { + local -a plugins + + plugins=($(_call_program rails_plugins ls -1 vendor/plugins)) + + _describe -t plugins 'plugin' plugins +} + +_rails_plugin_new() { + _rails_new +} + +_rails_runner() { + local context state line curcontext="$curcontext" + + _arguments -C \ + '(- *)'{-h,--help}'[Show this help message]' \ + '(-e --environment)'{-e,--environment=}'[Specifies the environment for the runner to operate under (test/development/production)]:name:(test development production)' \ + ': :->code_or_path' + + case "$state" in + code_or_path) + _alternative \ + 'files:filename:_files -g "*.rb"' \ + 'codes:ruby code:_guard "^-*" "ruby code"' + ;; + esac +} + +_rails_r() { + _rails_runner +} + +_rails_test() { + local context state line curcontext="$curcontext" + + _arguments -C \ + ': :->path' + + case "$state" in + path) + _alternative \ + 'files:filename:_files -g "*.rb"' + ;; + esac +} + +_rails_t() { + _rails_test +} + +_rails "$@" + +# 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 diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 29b413434..b11cbb5c7 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -1,3 +1,4 @@ +# rails command wrapper function _rails_command () { if [ -e "bin/stubs/rails" ]; then bin/stubs/rails $@ @@ -12,28 +13,31 @@ function _rails_command () { fi } +alias rails='_rails_command' +compdef _rails_command=rails + +# rake command wrapper function _rake_command () { if [ -e "bin/stubs/rake" ]; then bin/stubs/rake $@ elif [ -e "bin/rake" ]; then bin/rake $@ - elif type bundle &> /dev/null && ([ -e "Gemfile" ] || [ -e "gems.rb" ]); then + elif type bundle &> /dev/null && [[ -e "Gemfile" || -e "gems.rb" ]]; then bundle exec rake $@ else command rake $@ fi } -alias rails='_rails_command' -compdef _rails_command=rails - alias rake='_rake_command' compdef _rake_command=rake +# Log aliases alias devlog='tail -f log/development.log' alias prodlog='tail -f log/production.log' alias testlog='tail -f log/test.log' +# Environment settings alias -g RED='RAILS_ENV=development' alias -g REP='RAILS_ENV=production' alias -g RET='RAILS_ENV=test' @@ -43,47 +47,69 @@ alias rc='rails console' alias rcs='rails console --sandbox' alias rd='rails destroy' alias rdb='rails dbconsole' +alias rdc='rails db:create' +alias rdd='rails db:drop' +alias rdm='rails db:migrate' +alias rdmd='rails db:migrate:down' +alias rdmr='rails db:migrate:redo' +alias rdms='rails db:migrate:status' +alias rdmtc='rails db:migrate db:test:clone' +alias rdmu='rails db:migrate:up' +alias rdr='rails db:rollback' +alias rdrs='rails db:reset' +alias rds='rails db:seed' +alias rdsl='rails db:schema:load' +alias rdtc='rails db:test:clone' +alias rdtp='rails db:test:prepare' alias rgen='rails generate' alias rgm='rails generate migration' +alias rlc='rails log:clear' +alias rmd='rails middleware' +alias rn='rails notes' alias rp='rails plugin' alias rr='rails routes' alias rrg='rails routes | grep' -alias ru='rails runner' alias rs='rails server' +alias rsb='rails server --bind' alias rsd='rails server --debugger' alias rsp='rails server --port' -alias rsb='rails server --bind' +alias rsts='rails stats' +alias rt='rails test' +alias ru='rails runner' + +# Foreman aliases +alias fmns='foreman start' # Rake aliases -alias rdm='rake db:migrate' -alias rdmr='rake db:migrate:redo' -alias rdmd='rake db:migrate:down' -alias rdms='rake db:migrate:status' -alias rdmu='rake db:migrate:up' -alias rdr='rake db:rollback' -alias rdc='rake db:create' -alias rds='rake db:seed' -alias rdd='rake db:drop' -alias rdrs='rake db:reset' -alias rdtc='rake db:test:clone' -alias rdtp='rake db:test:prepare' -alias rdmtc='rake db:migrate db:test:clone' -alias rdsl='rake db:schema:load' -alias rlc='rake log:clear' -alias rn='rake notes' -alias rt='rake test' -alias rmd='rake middleware' -alias rsts='rake stats' +alias rkdc='rake db:create' +alias rkdd='rake db:drop' +alias rkdm='rake db:migrate' +alias rkdmd='rake db:migrate:down' +alias rkdmr='rake db:migrate:redo' +alias rkdms='rake db:migrate:status' +alias rkdmtc='rake db:migrate db:test:clone' +alias rkdmu='rake db:migrate:up' +alias rkdr='rake db:rollback' +alias rkdrs='rake db:reset' +alias rkds='rake db:seed' +alias rkdsl='rake db:schema:load' +alias rkdtc='rake db:test:clone' +alias rkdtp='rake db:test:prepare' +alias rklc='rake log:clear' +alias rkmd='rake middleware' +alias rkn='rake notes' +alias rksts='rake stats' +alias rkt='rake test' # legacy stuff -alias sstat='thin --stats "/thin/stats" start' -alias sg='ruby script/generate' +alias sc='ruby script/console' alias sd='ruby script/destroy' +alias sd='ruby script/server --debugger' +alias sg='ruby script/generate' alias sp='ruby script/plugin' alias sr='ruby script/runner' alias ssp='ruby script/spec' -alias sc='ruby script/console' -alias sd='ruby script/server --debugger' +alias sstat='thin --stats "/thin/stats" start' function remote_console() { /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" diff --git a/plugins/rbw/rbw.plugin.zsh b/plugins/rbw/rbw.plugin.zsh index 523e35aff..b6cecf8b4 100644 --- a/plugins/rbw/rbw.plugin.zsh +++ b/plugins/rbw/rbw.plugin.zsh @@ -2,12 +2,6 @@ if (( ! $+commands[rbw] )); then return fi -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `rbw`. Otherwise, compinit will have already done that. if [[ ! -f "$ZSH_CACHE_DIR/completions/_rbw" ]]; then diff --git a/plugins/rust/rust.plugin.zsh b/plugins/rust/rust.plugin.zsh index db6ca9e74..858f14126 100644 --- a/plugins/rust/rust.plugin.zsh +++ b/plugins/rust/rust.plugin.zsh @@ -2,11 +2,6 @@ if ! (( $+commands[rustup] && $+commands[cargo] )); then return fi -# Add completions folder in $ZSH_CACHE_DIR -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `cargo`. Otherwise, compinit will have already done that if [[ ! -f "$ZSH_CACHE_DIR/completions/_cargo" ]]; then diff --git a/plugins/rustup/rustup.plugin.zsh b/plugins/rustup/rustup.plugin.zsh index 3d59c1c54..ef141cf8f 100644 --- a/plugins/rustup/rustup.plugin.zsh +++ b/plugins/rustup/rustup.plugin.zsh @@ -1,14 +1,6 @@ print ${(%):-'%F{yellow}The `rustup` plugin is deprecated and has been moved to the `rust` plugin.'} print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'} -# TODO: 2021-12-28: remove this block -# Handle $0 according to the standard: -# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html -0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" -0="${${(M)0:#/*}:-$PWD/$0}" -# Remove old generated completion file -command rm -f "${0:A:h}/_rustup" "$ZSH_CACHE_DIR/rustup_version" - (( ${fpath[(Ie)$ZSH/plugins/rust]} )) || { fpath=("$ZSH/plugins/rust" $fpath) source "$ZSH/plugins/rust/rust.plugin.zsh" diff --git a/plugins/rvm/README.md b/plugins/rvm/README.md index 258c89420..576b037b0 100644 --- a/plugins/rvm/README.md +++ b/plugins/rvm/README.md @@ -23,6 +23,7 @@ plugins=(... rvm) | `rb26` | `rvm use ruby-2.6` | | `rb27` | `rvm use ruby-2.7` | | `rb30` | `rvm use ruby-3.0` | +| `rb31` | `rvm use ruby-3.1` | | `rvm-update` | `rvm get head` | | `gems` | `gem list` | | `rvms` | `rvm gemset` | diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 864389ba8..2a091d019 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -26,6 +26,7 @@ rubies=( 26 'ruby-2.6' 27 'ruby-2.7' 30 'ruby-3.0' + 31 'ruby-3.1' ) for v in ${(k)rubies}; do diff --git a/plugins/sprunge/README.md b/plugins/sprunge/README.md index fb70d42eb..80e3b30dc 100644 --- a/plugins/sprunge/README.md +++ b/plugins/sprunge/README.md @@ -18,7 +18,8 @@ plugins=(... sprunge) | `echo data \| sprunge` | Any piped data will be uploaded | Once sprunge has processed the input it will give you a unique HTTP address: -``` + +```console $ sprunge "hello" http://sprunge.us/XxjnKz ``` @@ -30,3 +31,8 @@ http://sprunge.us/XxjnKz - Argument precedence goes as follows: stdin > piped input > text strings. - If a filename is misspelled or doesn't have the necessary path description, it will NOT generate an error, but instead treat it as a text string. + +## Credits + +- Original code: [shellperson.net](https://web.archive.org/web/20190910065842/https://www.shellperson.net/sprunge-pastebin-script/). +- Adapted by: Matt Parnell (@ilikenwf). diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index 5d5687a82..48dff5837 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -1,7 +1,3 @@ -# Contributed and SLIGHTLY modded by Matt Parnell/ilikenwf <parwok -at- gmail> -# Created by the blogger at the URL below...I don't know where to find his/her name -# Original found at https://www.shellperson.net/sprunge-pastebin-script/ - sprunge() { if [[ "$1" = --help ]]; then fmt -s >&2 << EOF diff --git a/plugins/svn-fast-info/README.md b/plugins/svn-fast-info/README.md index 771378254..e86ba21e3 100644 --- a/plugins/svn-fast-info/README.md +++ b/plugins/svn-fast-info/README.md @@ -9,10 +9,10 @@ To use it, add `svn-fast-info` to the plugins array in your zshrc file: plugins=(... svn-fast-info) ``` -It's faster because his efficient use of svn (single svn call) which saves a lot on a huge codebase +It's faster because it has an efficient use of svn (single svn call) which saves a lot on a huge codebase. It displays the current status of the local files (added, deleted, modified, replaced, or else...) -Use `svn_prompt_info` method to display the svn repository status in your theme. +Use `svn_prompt_info` method to display the svn repository status in your theme. ## Functions diff --git a/plugins/terraform/README.md b/plugins/terraform/README.md index 474346dc0..59c6e7f2a 100644 --- a/plugins/terraform/README.md +++ b/plugins/terraform/README.md @@ -22,6 +22,7 @@ plugins=(... terraform) | `tfd` | `terraform destroy` | | `tff` | `terraform fmt` | | `tfi` | `terraform init` | +| `tfo` | `terraform output` | | `tfp` | `terraform plan` | | `tfv` | `terraform validate` | diff --git a/plugins/terraform/terraform.plugin.zsh b/plugins/terraform/terraform.plugin.zsh index f224b79f0..d9e39e6ac 100644 --- a/plugins/terraform/terraform.plugin.zsh +++ b/plugins/terraform/terraform.plugin.zsh @@ -13,5 +13,6 @@ alias tfa='terraform apply' alias tfd='terraform destroy' alias tff='terraform fmt' alias tfi='terraform init' +alias tfo='terraform output' alias tfp='terraform plan' alias tfv='terraform validate' diff --git a/plugins/toolbox/README.md b/plugins/toolbox/README.md new file mode 100644 index 000000000..aac2bb3b0 --- /dev/null +++ b/plugins/toolbox/README.md @@ -0,0 +1,19 @@ +# toolbox plugin + +Plugin for [toolbox](https://containertoolbx.org), a tool to use containerized CLI environments. + +To use it, add `toolbox` to your plugins array in your `.zshrc` file: + +```zsh +plugins=(... toolbox) +``` + +## Prompt function + +This plugins adds `toolbox_prompt_info()` function. Using it in your prompt, it will show the toolbox indicator ⬢ (if you are running in a toolbox container), and nothing if not. + +You can use it by adding `$(toolbox_prompt_info)` to your `PROMPT` or `RPROMPT` variable: + +```zsh +RPROMPT='$(toolbox_prompt_info)' +``` diff --git a/plugins/toolbox/kubectx.plugin.zsh b/plugins/toolbox/kubectx.plugin.zsh new file mode 100644 index 000000000..8b6bf5ecd --- /dev/null +++ b/plugins/toolbox/kubectx.plugin.zsh @@ -0,0 +1,3 @@ +function toolbox_prompt_info() { + [[ -f /run/.toolboxenv ]] && echo "⬢" +} diff --git a/plugins/volta/volta.plugin.zsh b/plugins/volta/volta.plugin.zsh index 79319394c..ab05ed5df 100644 --- a/plugins/volta/volta.plugin.zsh +++ b/plugins/volta/volta.plugin.zsh @@ -3,11 +3,6 @@ if (( ! $+commands[volta] )); then return fi -# TODO: 2021-12-28: remove this bit of code as it exists in oh-my-zsh.sh -# Add completions folder in $ZSH_CACHE_DIR -command mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) - # If the completion file doesn't exist yet, we need to autoload it and # bind it to `deno`. Otherwise, compinit will have already done that. if [[ ! -f "$ZSH_CACHE_DIR/completions/_volta" ]]; then diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md index bdbfac976..4dc9cdba2 100644 --- a/plugins/zsh-navigation-tools/README.md +++ b/plugins/zsh-navigation-tools/README.md @@ -226,7 +226,7 @@ Zsh plugins may look scary, as they seem to have some "architecture". In fact, w 1. It has its directory added to `fpath` 2. It has any first `*.plugin.zsh` file sourced -That's it. When one contributes to Oh-My-Zsh or creates a plugin for any plugin manager, he only needs to account for this. +That's it. When one contributes to Oh-My-Zsh or creates a plugin for any plugin manager, they only need to account for this. The same with doing any non-typical Zsh Navigation Tools installation. ## More diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme index 95e6249fa..0c183258e 100644 --- a/themes/apple.zsh-theme +++ b/themes/apple.zsh-theme @@ -2,27 +2,23 @@ function toon { echo -n "" } -get_git_dirty() { - git diff --quiet || echo '*' -} - autoload -Uz vcs_info zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes -zstyle ':vcs_info:*' actionformats \ - '%F{5}%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f ' -zstyle ':vcs_info:*' formats \ - '%F{5}%F{5}[%F{2}%b%c%u%F{5}]%f ' -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' +zstyle ':vcs_info:*' actionformats '%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f ' +zstyle ':vcs_info:*' formats '%F{5}[%F{2}%b%c%u%F{5}]%f ' +zstyle ':vcs_info:svn:*' branchformat '%b' +zstyle ':vcs_info:svn:*' actionformats '%F{5}[%F{2}%b%F{1}:%F{3}%i%F{3}|%F{1}%a%c%u%F{5}]%f ' +zstyle ':vcs_info:svn:*' formats '%F{5}[%F{2}%b%F{1}:%F{3}%i%c%u%F{5}]%f ' zstyle ':vcs_info:*' enable git cvs svn theme_precmd () { - vcs_info + vcs_info } setopt prompt_subst PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}' autoload -U add-zsh-hook -add-zsh-hook precmd theme_precmd
\ No newline at end of file +add-zsh-hook precmd theme_precmd diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme index 7ac461036..b1aef21df 100644 --- a/themes/gentoo.zsh-theme +++ b/themes/gentoo.zsh-theme @@ -6,7 +6,9 @@ zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unst zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f ' zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f ' -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' +zstyle ':vcs_info:svn:*' branchformat '%b' +zstyle ':vcs_info:svn:*' actionformats '%F{5}(%F{2}%b%F{1}:%{3}%i%F{3}|%F{1}%a%c%u%m%F{5})%f ' +zstyle ':vcs_info:svn:*' formats '%F{5}(%F{2}%b%F{1}:%F{3}%i%c%u%m%F{5})%f ' zstyle ':vcs_info:*' enable git cvs svn zstyle ':vcs_info:git*+set-message:*' hooks untracked-git diff --git a/themes/jnrowe.zsh-theme b/themes/jnrowe.zsh-theme index 9d8fb2488..5a5ab349f 100644 --- a/themes/jnrowe.zsh-theme +++ b/themes/jnrowe.zsh-theme @@ -4,7 +4,6 @@ autoload -Uz vcs_info zstyle ':vcs_info:*' actionformats \ '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f ' -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' zstyle ':vcs_info:*' enable git add-zsh-hook precmd prompt_vcs diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme index 51b0af724..e07be75c4 100644 --- a/themes/kolo.zsh-theme +++ b/themes/kolo.zsh-theme @@ -3,16 +3,18 @@ autoload -Uz vcs_info zstyle ':vcs_info:*' stagedstr '%F{green}●' zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r' +zstyle ':vcs_info:svn:*' branchformat '%b' +zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]' zstyle ':vcs_info:*' enable git svn + theme_precmd () { - if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { - zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]' - } else { - zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]' - } + if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then + zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]' + else + zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}●%F{green}]' + fi - vcs_info + vcs_info } setopt prompt_subst diff --git a/themes/linuxonly.zsh-theme b/themes/linuxonly.zsh-theme index 2afae8fc3..98572b904 100644 --- a/themes/linuxonly.zsh-theme +++ b/themes/linuxonly.zsh-theme @@ -28,7 +28,6 @@ zstyle ':vcs_info:*' actionformats \ '%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' zstyle ':vcs_info:*' formats \ "%{$c8%}%s%{$c7%}:%{$c7%}(%{$c9%}%b%{$c7%})%f " -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' zstyle ':vcs_info:*' enable git add-zsh-hook precmd prompt_jnrowe_precmd diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index 7ff6a7ffe..bb86d68db 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -35,23 +35,17 @@ local reset="%{$reset_color%}" local -a color_array color_array=($green $red $cyan $yellow $blue $magenta $white) -local username_normal_color=$white -local username_root_color=$red -local hostname_root_color=$red - -# calculating hostname color with hostname characters -for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]] -local -a hostname_color -hostname_color=%(!.$hostname_root_color.$hostname_normal_color) - +local username_color=$white +local hostname_color=$color_array[$[((#HOST))%7+1]] # choose hostname color based on first character local current_dir_color=$blue -local username_command="%n" -local hostname_command="%m" + +local username="%n" +local hostname="%m" local current_dir="%~" -local username_output="%(!..$username_normal_color$username_command$reset@)" -local hostname_output="$hostname_color$hostname_command$reset" -local current_dir_output="$current_dir_color$current_dir$reset" +local username_output="%(!..${username_color}${username}${reset}@)" +local hostname_output="${hostname_color}${hostname}${reset}" +local current_dir_output="${current_dir_color}${current_dir}${reset}" local jobs_bg="${red}fg: %j$reset" local last_command_output="%(?.%(!.$red.$green).$yellow)" @@ -68,8 +62,18 @@ ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">" ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<" ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>" -PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)' -GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)' -PROMPT+="$GIT_PROMPT" +function michelebologna_git_prompt { + local out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status) + [[ -n $out ]] || return + printf " %s(%s%s%s)%s" \ + "%{$fg_bold[white]%}" \ + "%{$fg_bold[green]%}" \ + "$out" \ + "%{$fg_bold[white]%}" \ + "%{$reset_color%}" +} + +PROMPT="$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)" +PROMPT+='$(michelebologna_git_prompt)' PROMPT+=" $last_command_output%#$reset " RPROMPT='' diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme index 849daf30b..260c9e701 100644 --- a/themes/trapd00r.zsh-theme +++ b/themes/trapd00r.zsh-theme @@ -102,7 +102,6 @@ zstyle ':vcs_info:*' actionformats \ zstyle ':vcs_info:*' formats \ "%{$c8%}%s%%{$c7%}❨ %{$c9%}%{$c11%}%b%{$c7%} ❩%{$reset_color%}%f " -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' zstyle ':vcs_info:*' enable git add-zsh-hook precmd prompt_jnrowe_precmd diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme index 27597ec6c..a00650ac8 100644 --- a/themes/zhann.zsh-theme +++ b/themes/zhann.zsh-theme @@ -3,16 +3,18 @@ autoload -Uz vcs_info zstyle ':vcs_info:*' stagedstr '%F{green}●' zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r' +zstyle ':vcs_info:svn:*' branchformat '%b' +zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]' zstyle ':vcs_info:*' enable git svn + theme_precmd () { - if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { - zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]' - } else { - zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]' - } + if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then + zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]' + else + zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}●%F{green}]' + fi - vcs_info + vcs_info } setopt prompt_subst diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index a36aecb84..d3ad7582c 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -36,11 +36,11 @@ function current_epoch() { function is_update_available() { local branch - branch=${"$(cd -q "$ZSH"; git config --local oh-my-zsh.branch)":-master} + branch=${"$(builtin cd -q "$ZSH"; git config --local oh-my-zsh.branch)":-master} local remote remote_url remote_repo - remote=${"$(cd -q "$ZSH"; git config --local oh-my-zsh.remote)":-origin} - remote_url=$(cd -q "$ZSH"; git config remote.$remote.url) + remote=${"$(builtin cd -q "$ZSH"; git config --local oh-my-zsh.remote)":-origin} + remote_url=$(builtin cd -q "$ZSH"; git config remote.$remote.url) local repo case "$remote_url" in @@ -58,25 +58,34 @@ function is_update_available() { # Get local HEAD. If this fails assume there are updates local local_head - local_head=$(cd -q "$ZSH"; git rev-parse $branch 2>/dev/null) || return 0 + local_head=$(builtin cd -q "$ZSH"; git rev-parse $branch 2>/dev/null) || return 0 # Get remote HEAD. If no suitable command is found assume there are updates # On any other error, skip the update (connection may be down) local remote_head remote_head=$( if (( ${+commands[curl]} )); then - curl -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null + curl -m 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null elif (( ${+commands[wget]} )); then - wget -O- --header='Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null + wget -T 2 -O- --header='Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null elif (( ${+commands[fetch]} )); then - HTTP_ACCEPT='Accept: application/vnd.github.v3.sha' fetch -o - $api_url 2>/dev/null + HTTP_ACCEPT='Accept: application/vnd.github.v3.sha' fetch -T 2 -o - $api_url 2>/dev/null else exit 0 fi ) || return 1 - # Compare local and remote HEADs - [[ "$local_head" != "$remote_head" ]] + # Compare local and remote HEADs (if they're equal there are no updates) + [[ "$local_head" != "$remote_head" ]] || return 1 + + # If local and remote HEADs don't match, check if there's a common ancestor + # If the merge-base call fails, $remote_head might not be downloaded so assume there are updates + local base + base=$(builtin cd -q "$ZSH"; git merge-base $local_head $remote_head 2>/dev/null) || return 0 + + # If the common ancestor ($base) is not $remote_head, + # the local HEAD is older than the remote HEAD + [[ $base != $remote_head ]] } function update_last_updated_file() { @@ -161,7 +170,7 @@ function has_typed_input() { fi # Test if Oh My Zsh directory is a git repository - if ! (cd -q "$ZSH" && LANG= git rev-parse &>/dev/null); then + if ! (builtin cd -q "$ZSH" && LANG= git rev-parse &>/dev/null); then echo >&2 "[oh-my-zsh] Can't update: not a git repository." return fi diff --git a/tools/install.sh b/tools/install.sh index e64e39063..495ad2c11 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -42,13 +42,19 @@ set -e # $USER is defined by login(1) which is not always executed (e.g. containers) # POSIX: https://pubs.opengroup.org/onlinepubs/009695299/utilities/id.html USER=${USER:-$(id -u -n)} +# $HOME is defined at the time of login, but it could be unset. If it is unset, +# a tilde by itself (~) will not be expanded to the current user's home directory. +# POSIX: https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html#tag_08_03 +HOME="${HOME:-$(getent passwd $USER 2>/dev/null | cut -d: -f6)}" +# macOS does not have getent, but this works even if $HOME is unset +HOME="${HOME:-$(eval echo ~$USER)}" # Track if $ZSH was provided custom_zsh=${ZSH:+yes} # Default settings -ZSH=${ZSH:-~/.oh-my-zsh} +ZSH="${ZSH:-$HOME/.oh-my-zsh}" REPO=${REPO:-ohmyzsh/ohmyzsh} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master} @@ -268,7 +274,7 @@ setup_ohmyzsh() { fi # Manual clone with git config options to support git < v1.7.2 - git init "$ZSH" && cd "$ZSH" \ + git init --quiet "$ZSH" && cd "$ZSH" \ && git config core.eol lf \ && git config core.autocrlf false \ && git config fsck.zeroPaddedFilemode ignore \ @@ -279,10 +285,15 @@ setup_ohmyzsh() { && git remote add origin "$REMOTE" \ && git fetch --depth=1 origin \ && git checkout -b "$BRANCH" "origin/$BRANCH" || { - rm -rf "$ZSH" + [ ! -d "$ZSH" ] || { + cd - + rm -rf "$ZSH" 2>/dev/null + } fmt_error "git clone of oh-my-zsh repo failed" exit 1 } + # Exit installation directory + cd - echo } diff --git a/tools/upgrade.sh b/tools/upgrade.sh index b6cb10b5a..afc6a98dd 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -164,6 +164,10 @@ git remote -v | while read remote url extra; do git@github.com:robbyrussell/oh-my-zsh(|.git)) git remote set-url "$remote" "git@github.com:ohmyzsh/ohmyzsh.git" break ;; + # Update out-of-date "unauthenticated git protocol on port 9418" to https + git://github.com/robbyrussell/oh-my-zsh(|.git)) + git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git" + break ;; esac done |