mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-11 05:39:45 +08:00
Compare commits
14 Commits
2b499e1a9e
...
1689e9bb90
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1689e9bb90 | ||
|
|
befdb4649b | ||
|
|
dddbb5c9eb | ||
|
|
f94e55a1a9 | ||
|
|
e61228282a | ||
|
|
389de86cf5 | ||
|
|
c3984a7759 | ||
|
|
5023a4787b | ||
|
|
a2cad16790 | ||
|
|
864b441688 | ||
|
|
6f85dc2389 | ||
|
|
888ab9091c | ||
|
|
3e16d64347 | ||
|
|
08b04f5df2 |
@ -83,7 +83,7 @@ function detect-clipboard() {
|
|||||||
function clippaste() { tmux save-buffer -; }
|
function clippaste() { tmux save-buffer -; }
|
||||||
elif [[ $(uname -r) = *icrosoft* ]]; then
|
elif [[ $(uname -r) = *icrosoft* ]]; then
|
||||||
function clipcopy() { clip.exe < "${1:-/dev/stdin}"; }
|
function clipcopy() { clip.exe < "${1:-/dev/stdin}"; }
|
||||||
function clippaste() { _retry_clipboard_detection_or_fail clippaste "$@"; }
|
function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
|
||||||
else
|
else
|
||||||
function _retry_clipboard_detection_or_fail() {
|
function _retry_clipboard_detection_or_fail() {
|
||||||
local clipcmd="${1}"; shift
|
local clipcmd="${1}"; shift
|
||||||
|
|||||||
@ -91,12 +91,13 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
|
|||||||
function update_terminalapp_cwd() {
|
function update_terminalapp_cwd() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
|
|
||||||
# Percent-encode the pathname.
|
# Percent-encode the host and path names.
|
||||||
local URL_PATH="$(omz_urlencode -P $PWD)"
|
local URL_HOST URL_PATH
|
||||||
[[ $? != 0 ]] && return 1
|
URL_HOST="$(omz_urlencode -P $HOST)" || return 1
|
||||||
|
URL_PATH="$(omz_urlencode -P $PWD)" || return 1
|
||||||
|
|
||||||
# Undocumented Terminal.app-specific control sequence
|
# Undocumented Terminal.app-specific control sequence
|
||||||
printf '\e]7;%s\a' "file://$HOST$URL_PATH"
|
printf '\e]7;%s\a' "file://$URL_HOST$URL_PATH"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
||||||
|
|||||||
@ -18,17 +18,13 @@ _composer () {
|
|||||||
local curcontext="$curcontext" state line
|
local curcontext="$curcontext" state line
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
_arguments \
|
_arguments \
|
||||||
'1: :->command'\
|
'*:: :->subcmds'
|
||||||
'*: :->args'
|
|
||||||
|
|
||||||
case $state in
|
if (( CURRENT == 1 )) || ( ((CURRENT == 2)) && [ "$words[1]" = "global" ] ) ; then
|
||||||
command)
|
|
||||||
compadd $(_composer_get_command_list)
|
compadd $(_composer_get_command_list)
|
||||||
;;
|
else
|
||||||
*)
|
|
||||||
compadd $(_composer_get_required_list)
|
compadd $(_composer_get_required_list)
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compdef _composer composer
|
compdef _composer composer
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
fancy-ctrl-z () {
|
fancy-ctrl-z () {
|
||||||
if [[ $#BUFFER -eq 0 ]]; then
|
if [[ $#BUFFER -eq 0 ]]; then
|
||||||
BUFFER="fg"
|
BUFFER="fg"
|
||||||
zle accept-line
|
zle accept-line -w
|
||||||
else
|
else
|
||||||
zle push-input
|
zle push-input -w
|
||||||
zle clear-screen
|
zle clear-screen -w
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
zle -N fancy-ctrl-z
|
zle -N fancy-ctrl-z
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
if [ $commands[fasd] ]; then # check if fasd is installed
|
if [ $commands[fasd] ]; then # check if fasd is installed
|
||||||
fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
|
fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
|
||||||
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
|
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
|
||||||
fasd --init auto >| "$fasd_cache"
|
fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \
|
||||||
|
zsh-wcomp zsh-wcomp-install >| "$fasd_cache"
|
||||||
fi
|
fi
|
||||||
source "$fasd_cache"
|
source "$fasd_cache"
|
||||||
unset fasd_cache
|
unset fasd_cache
|
||||||
|
|||||||
@ -1,12 +1,19 @@
|
|||||||
## ZSH-Geeknote
|
ZSH-Geeknote
|
||||||
|
============
|
||||||
|
|
||||||
[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for oh-my-zsh.
|
[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for oh-my-zsh.
|
||||||
|
|
||||||
Plugins provides:
|
Plugins provides:
|
||||||
|
|
||||||
- auto completion of commands and their options
|
* auto completion of commands and their options
|
||||||
- alias `gn`
|
* alias `gn`
|
||||||
|
|
||||||
You can find information how to install Geeknote and it's available commands on the [project website](http://www.geeknote.me/).
|
## Installation
|
||||||
|
|
||||||
Maintainer : Ján Koščo ([@s7anley](https://twitter.com/s7anley))
|
### oh-my-zsh
|
||||||
|
This plugin is already bundled in oh-my-zsh. To enable just configure plugin definition
|
||||||
|
|
||||||
|
plugins=( ... geeknote ...)
|
||||||
|
|
||||||
|
### Antigen
|
||||||
|
Use [Antigen's](https://github.com/zsh-users/antigen) bundle command to install by adding `antigen bundle s7anley/zsh-geeknote` to your `.zshrc` along with your other plugins.
|
||||||
|
|||||||
@ -1,34 +1,118 @@
|
|||||||
#compdef geeknote
|
#compdef geeknote
|
||||||
# --------------- ------------------------------------------------------------
|
|
||||||
# Name : _geeknote
|
# Geeknote Autocomplete plugin for Zsh
|
||||||
# Synopsis : zsh completion for geeknote
|
# Requires: Geeknote installed
|
||||||
# Author : Ján Koščo <3k.stanley@gmail.com>
|
# Author : Ján Koščo (@s7anley)
|
||||||
# HomePage : http://www.geeknote.me
|
|
||||||
# Version : 0.1
|
__login() {
|
||||||
# Tag : [ shell, zsh, completion, evernote ]
|
# no arguments
|
||||||
# Copyright : © 2014 by Ján Koščo,
|
}
|
||||||
# Released under current GPL license.
|
|
||||||
# --------------- ------------------------------------------------------------
|
__logout() {
|
||||||
|
_arguments \
|
||||||
|
'--force[Do not ask about logging out.]'
|
||||||
|
}
|
||||||
|
|
||||||
|
__settings() {
|
||||||
|
_arguments \
|
||||||
|
"--editor+[Set the editor, which use to edit and create notes.]::"
|
||||||
|
}
|
||||||
|
|
||||||
|
__create() {
|
||||||
|
_arguments \
|
||||||
|
'--title+[The note title.]::' \
|
||||||
|
'--content+[The note content.]::' \
|
||||||
|
'--tags+[One tag or the list of tags which will be added to the note.]::' \
|
||||||
|
'--notebook+[Set the notebook where to save note.]::' \
|
||||||
|
'--resource+[Add a resource to the note.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__edit() {
|
||||||
|
_arguments \
|
||||||
|
'--note+[The name or ID from the previous search of a note to edit.]::' \
|
||||||
|
'--title+[Set new title of the note.]::' \
|
||||||
|
'--content+[Set new content of the note.]::' \
|
||||||
|
'--tags+[Set new list o tags for the note.]::' \
|
||||||
|
'--notebook+[Assign new notebook for the note.]::' \
|
||||||
|
'--resource+[Add a resource to the note.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__find() {
|
||||||
|
_arguments \
|
||||||
|
'--search+[Text to search.]::' \
|
||||||
|
'--tags+[Notes with which tag/tags to search.]::' \
|
||||||
|
'--notebook+[In which notebook search the note.]::' \
|
||||||
|
'--date+[Set date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy.]::' \
|
||||||
|
'--count+[How many notes show in the result list.]::' \
|
||||||
|
'--with-url[Add direct url of each note in results to Evernote web-version.]' \
|
||||||
|
'--content-search[Search by content, not by title.]' \
|
||||||
|
'--exact-entry[Search for exact entry of the request.]'
|
||||||
|
}
|
||||||
|
|
||||||
|
__show() {
|
||||||
|
_arguments \
|
||||||
|
'--note+[The name or ID from the previous search of a note to show.]::' \
|
||||||
|
'--raw[Show the raw note body.]'
|
||||||
|
}
|
||||||
|
|
||||||
|
__remove() {
|
||||||
|
_arguments \
|
||||||
|
'--note+[The name or ID from the previous search of a note to remove.]::' \
|
||||||
|
'--force[Do not ask about removing.]'
|
||||||
|
}
|
||||||
|
|
||||||
|
__notebook-list() {
|
||||||
|
# no arguments
|
||||||
|
}
|
||||||
|
|
||||||
|
__notebook-create() {
|
||||||
|
_arguments \
|
||||||
|
'--title+[Set the title of new notebook.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__notebook-edit() {
|
||||||
|
_arguments \
|
||||||
|
'--title+[Set the title of new notebook.]::' \
|
||||||
|
'--notebook+[The name of a notebook to rename.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__tag-list() {
|
||||||
|
# no arguments
|
||||||
|
}
|
||||||
|
|
||||||
|
__tag-create() {
|
||||||
|
_arguments \
|
||||||
|
'--title+[Set the title of new tag.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__tag-edit() {
|
||||||
|
_arguments \
|
||||||
|
'--tagname+[The name of a tag to rename.]::' \
|
||||||
|
'--title+[Set the new name of tag.]::'
|
||||||
|
}
|
||||||
|
|
||||||
|
__user() {
|
||||||
|
_arguments \
|
||||||
|
'--full[Show full information.]'
|
||||||
|
}
|
||||||
|
|
||||||
local -a _1st_arguments
|
local -a _1st_arguments
|
||||||
_1st_arguments=(
|
_1st_arguments=(
|
||||||
'login'
|
'login':'Authorize in Evernote.'
|
||||||
'logout'
|
'logout':'Logout from Evernote.'
|
||||||
'settings'
|
'settings':'Show and edit current settings.'
|
||||||
'create'
|
'create':'Create note in Evernote.'
|
||||||
'edit'
|
'edit':'Edit note in Evernote.'
|
||||||
'find'
|
'find':'Search notes in Evernote.'
|
||||||
'show'
|
'show':'Output note in the terminal.'
|
||||||
'remove'
|
'remove':'Remove note from Evernote.'
|
||||||
'notebook-list'
|
'notebook-list':'Show the list of existing notebooks in your Evernote.'
|
||||||
'notebook-create'
|
'notebook-create':'Create new notebook.'
|
||||||
'notebook-edit'
|
'notebook-edit':'Edit/rename notebook.'
|
||||||
'tag-list'
|
'tag-list':'Show the list of existing tags in your Evernote.'
|
||||||
'tag-create'
|
'tag-create':'Create new tag.'
|
||||||
'tag-edit'
|
'tag-edit':'Edit/rename tag.'
|
||||||
'tag-remove'
|
'user':'Show information about active user.'
|
||||||
'gnsync'
|
|
||||||
'user'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments '*:: :->command'
|
_arguments '*:: :->command'
|
||||||
@ -40,97 +124,34 @@ fi
|
|||||||
|
|
||||||
local -a _command_args
|
local -a _command_args
|
||||||
case "$words[1]" in
|
case "$words[1]" in
|
||||||
user)
|
login)
|
||||||
_command_args=(
|
__login ;;
|
||||||
'(--full)--full' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
logout)
|
logout)
|
||||||
_command_args=(
|
__logout ;;
|
||||||
'(--force)--force' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
settings)
|
settings)
|
||||||
_command_args=(
|
__settings ;;
|
||||||
'(--editor)--editor' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
create)
|
create)
|
||||||
_command_args=(
|
__create ;;
|
||||||
'(-t|--title)'{-t,--title}'[note title]' \
|
|
||||||
'(-c|--content)'{-c,--content}'[note content]' \
|
|
||||||
'(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
|
|
||||||
'(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
edit)
|
edit)
|
||||||
_command_args=(
|
__edit ;;
|
||||||
'(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
|
|
||||||
'(-t|--title)'{-t,--title}'[note title]' \
|
|
||||||
'(-c|--content)'{-c,--content}'[note content]' \
|
|
||||||
'(-tg|--tags)'{-tg,--tags}'[one tag or the list of tags which will be added to the note]' \
|
|
||||||
'(-nb|--notebook)'{-nb,--notebook}'[name of notebook where to save note]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
remove)
|
|
||||||
_command_args=(
|
|
||||||
'(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
|
|
||||||
'(--force)--force' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
show)
|
|
||||||
_command_args=(
|
|
||||||
'(-n|--note)'{-n,--note}'[name or ID from the previous search of a note to edit]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
find)
|
find)
|
||||||
_command_args=(
|
__find ;;
|
||||||
'(-s|--search)'{-s,--search}'[text to search]' \
|
show)
|
||||||
'(-tg|--tags)'{-tg,--tags}'[notes with which tag/tags to search]' \
|
__show ;;
|
||||||
'(-nb|--notebook)'{-nb,--notebook}'[in which notebook search the note]' \
|
remove)
|
||||||
'(-d|--date)'{-d,--date}'[date in format dd.mm.yyyy or date range dd.mm.yyyy-dd.mm.yyyy]' \
|
__remove ;;
|
||||||
'(-cn|--count)'{-cn,--count}'[how many notes show in the result list]' \
|
notebook-list)
|
||||||
'(-uo|--url-only)'{-uo,--url-only}'[add direct url of each note in results to Evernote web-version]' \
|
__notebook-list ;;
|
||||||
'(-ee|--exact-entry)'{-ee,--exact-entry}'[search for exact entry of the request]' \
|
|
||||||
'(-cs|--content-search)'{-cs,--content-search}'[search by content, not by title]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
notebook-create)
|
notebook-create)
|
||||||
_command_args=(
|
__notebook-create ;;
|
||||||
'(-t|--title)'{-t,--title}'[notebook title]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
notebook-edit)
|
notebook-edit)
|
||||||
_command_args=(
|
__notebook-edit ;;
|
||||||
'(-nb|--notebook)'{-nb,--notebook}'[name of notebook to rename]' \
|
tag-list)
|
||||||
'(-t|--title)'{-t,--title}'[new notebook title]' \
|
__tag-list ;;
|
||||||
)
|
|
||||||
;;
|
|
||||||
notebook-remove)
|
|
||||||
_command_args=(
|
|
||||||
'(-nb|--notebook)'{-nb,--notebook}'[name of notebook to remove]' \
|
|
||||||
'(--force)--force' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
tag-create)
|
tag-create)
|
||||||
_command_args=(
|
__tag-create ;;
|
||||||
'(-t|--title)'{-t,--title}'[title of tag]' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
tag-edit)
|
tag-edit)
|
||||||
_command_args=(
|
__tag-edit ;;
|
||||||
'(-tgn|--tagname)'{-tgn,--tagname}'[tag to edit]' \
|
user)
|
||||||
'(-t|--title)'{-t,--title}'[new tag name]' \
|
__user ;;
|
||||||
)
|
|
||||||
;;
|
|
||||||
tag-remove)
|
|
||||||
_command_args=(
|
|
||||||
'(-tgn|--tagname)'{-tgn,--tagname}'[tag to remove]' \
|
|
||||||
'(--force)--force' \
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_arguments \
|
|
||||||
$_command_args \
|
|
||||||
&& return 0
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
function gi() { curl -fL https://www.gitignore.io/api/${(j:,:)@} }
|
function gi() { curl -fLw '\n' https://www.gitignore.io/api/"${(j:,:)@}" }
|
||||||
|
|
||||||
_gitignoreio_get_command_list() {
|
_gitignoreio_get_command_list() {
|
||||||
curl -sfL https://www.gitignore.io/api/list | tr "," "\n"
|
curl -sfL https://www.gitignore.io/api/list | tr "," "\n"
|
||||||
|
|||||||
@ -83,7 +83,7 @@ function _gradle_arguments() {
|
|||||||
'--quiet[Log errors only]' \
|
'--quiet[Log errors only]' \
|
||||||
'--recompile-scripts[Forces scripts to be recompiled, bypassing caching]' \
|
'--recompile-scripts[Forces scripts to be recompiled, bypassing caching]' \
|
||||||
'--refresh-dependencies[Refresh the state of dependencies]' \
|
'--refresh-dependencies[Refresh the state of dependencies]' \
|
||||||
'--rerun-task[Specifies that any task optimization is ignored]' \
|
'--rerun-tasks[Specifies that any task optimization is ignored]' \
|
||||||
'--settings-file[Specifies the settings file]' \
|
'--settings-file[Specifies the settings file]' \
|
||||||
'--stacktrace[Print out the stacktrace also for user exceptions]' \
|
'--stacktrace[Print out the stacktrace also for user exceptions]' \
|
||||||
'--status[Print Gradle Daemon status]' \
|
'--status[Print Gradle Daemon status]' \
|
||||||
|
|||||||
@ -67,7 +67,7 @@ _kitchen() {
|
|||||||
_kitchen_commands() {
|
_kitchen_commands() {
|
||||||
local commands
|
local commands
|
||||||
|
|
||||||
commands=("${(@f)$(_call_program commands $service help | sed -n 's/^ kitchen \([[:alpha:]]*\) [ [].*# \(.*\)$/\1:\2/p')}")
|
commands=("${(@f)$(_call_program commands $service help | sed -n 's/^ kitchen \([[:alpha:]]*\) [ A-Z[].*# \(.*\)$/\1:\2/p')}")
|
||||||
_describe -t commands 'kitchen commands' commands
|
_describe -t commands 'kitchen commands' commands
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@ Update .zshrc:
|
|||||||
### What's inside?
|
### What's inside?
|
||||||
#### Adds handy aliases:
|
#### Adds handy aliases:
|
||||||
###### general
|
###### general
|
||||||
|
* `hga` - 'hg add`
|
||||||
* `hgc` - `hg commit`
|
* `hgc` - `hg commit`
|
||||||
* `hgb` - `hg branch`
|
* `hgb` - `hg branch`
|
||||||
* `hgba` - `hg branches`
|
* `hgba` - `hg branches`
|
||||||
|
|||||||
@ -34,6 +34,7 @@ _1st_arguments=(
|
|||||||
'firmware:Nerves - Build a firmware image for the selected target platform'
|
'firmware:Nerves - Build a firmware image for the selected target platform'
|
||||||
'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
|
'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
|
||||||
'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
|
'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
|
||||||
|
'format:Formats the given files and patterns'
|
||||||
'help:Print help information for tasks'
|
'help:Print help information for tasks'
|
||||||
'hex:Print hex help information'
|
'hex:Print hex help information'
|
||||||
'hex.config:Read or update hex config'
|
'hex.config:Read or update hex config'
|
||||||
@ -92,7 +93,7 @@ __task_list ()
|
|||||||
local expl
|
local expl
|
||||||
declare -a tasks
|
declare -a tasks
|
||||||
|
|
||||||
tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.presence phx.gen.schema phx.gen.secret phx.new phx.new.ecto phx.new.web phx.routes phx.server run test)
|
tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build format help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.presence phx.gen.schema phx.gen.secret phx.new phx.new.ecto phx.new.web phx.routes phx.server run test)
|
||||||
|
|
||||||
_wanted tasks expl 'help' compadd $tasks
|
_wanted tasks expl 'help' compadd $tasks
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,14 @@
|
|||||||
# Please visit https://git.zx2c4.com/password-store/tree/COPYING for more information.
|
# Please visit https://git.zx2c4.com/password-store/tree/COPYING for more information.
|
||||||
|
|
||||||
|
|
||||||
|
# If you use multiple repositories, you can configure completion like this:
|
||||||
|
#
|
||||||
|
# compdef _pass workpass
|
||||||
|
# zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass"
|
||||||
|
# workpass() {
|
||||||
|
# PASSWORD_STORE_DIR=$HOME/work/pass pass $@
|
||||||
|
# }
|
||||||
|
|
||||||
# If you use multiple repositories, you can configure completion like this:
|
# If you use multiple repositories, you can configure completion like this:
|
||||||
#
|
#
|
||||||
# compdef _pass workpass
|
# compdef _pass workpass
|
||||||
|
|||||||
@ -1,37 +1,2 @@
|
|||||||
function _stack_commands() {
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
local ret=1 state
|
source <(stack --bash-completion-script stack)
|
||||||
_arguments ':subcommand:->subcommand' && ret=0
|
|
||||||
|
|
||||||
case $state in
|
|
||||||
subcommand)
|
|
||||||
subcommands=(
|
|
||||||
"build:Build the project(s) in this directory/configuration"
|
|
||||||
"install:Build executables and install to a user path"
|
|
||||||
"test:Build and test the project(s) in this directory/configuration"
|
|
||||||
"bench:Build and benchmark the project(s) in this directory/configuration"
|
|
||||||
"haddock:Generate haddocks for the project(s) in this directory/configuration"
|
|
||||||
"new:Create a brand new project"
|
|
||||||
"init:Initialize a stack project based on one or more stack packages"
|
|
||||||
"solver:Use a dependency solver to try and determine missing extra-deps"
|
|
||||||
"setup:Get the appropriate ghc for your project"
|
|
||||||
"path:Print out handy path information"
|
|
||||||
"unpack:Unpack one or more packages locally"
|
|
||||||
"update:Update the package index"
|
|
||||||
"upgrade:Upgrade to the latest stack (experimental)"
|
|
||||||
"upload:Upload a package to Hackage"
|
|
||||||
"dot:Visualize your project's dependency graph using Graphviz dot"
|
|
||||||
"exec:Execute a command"
|
|
||||||
"ghc:Run ghc"
|
|
||||||
"ghci:Run ghci in the context of project(s)"
|
|
||||||
"ide:Run ide-backend-client with the correct arguments"
|
|
||||||
"runghc:Run runghc"
|
|
||||||
"clean:Clean the local packages"
|
|
||||||
"docker:Subcommands specific to Docker use"
|
|
||||||
)
|
|
||||||
_describe -t subcommands 'stack subcommands' subcommands && ret=0
|
|
||||||
esac
|
|
||||||
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
|
|
||||||
compdef _stack_commands stack
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ src() {
|
|||||||
autoload -U compinit zrecompile
|
autoload -U compinit zrecompile
|
||||||
compinit -i -d "$cache/zcomp-$HOST"
|
compinit -i -d "$cache/zcomp-$HOST"
|
||||||
|
|
||||||
for f in ~/.zshrc "$cache/zcomp-$HOST"; do
|
for f in ${ZDOTDIR:-~}/.zshrc "$cache/zcomp-$HOST"; do
|
||||||
zrecompile -p $f && command rm -f $f.zwc.old
|
zrecompile -p $f && command rm -f $f.zwc.old
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user