mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
3 Commits
e9ee3ad6c1
...
d37c609b9e
Author | SHA1 | Date |
---|---|---|
|
d37c609b9e | |
|
6e7ac0544e | |
|
cf4093dbdc |
|
@ -0,0 +1,7 @@
|
||||||
|
# sanity autocomplete plugin
|
||||||
|
|
||||||
|
* Adds autocomplete options for all Sanity commands.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
In order to make this work, you will need to have Sanity set up in your path.
|
|
@ -0,0 +1,42 @@
|
||||||
|
#compdef sanity
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
# In order to make this work, you will need to have Sanity installed.
|
||||||
|
# https://www.sanity.io/
|
||||||
|
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
'build:Builds the current Sanity configuration to a static bundle.'
|
||||||
|
'check:Performs a Sanity check.'
|
||||||
|
'configcheck:Checks if the required configuration files for plugins exists and are up to date.'
|
||||||
|
'cors:Interact with CORS-entries for your project.'
|
||||||
|
'dataset:Interact with datasets in your project.'
|
||||||
|
'debug:Gathers information on Sanity environment.'
|
||||||
|
'deploy:Deploys a statically built Sanity studio.'
|
||||||
|
'docs:Opens the Sanity documentation.'
|
||||||
|
'documents:Interact with documents in your project.'
|
||||||
|
'exec:Runs a script in Sanity context.'
|
||||||
|
'graphql:Interact with GraphQL APIs.'
|
||||||
|
'help:Displays help information about Sanity.'
|
||||||
|
'hook:Interact with hooks in your project.'
|
||||||
|
'init:Initialize a new Sanity project or plugin.'
|
||||||
|
'install:Installs a Sanity plugin to the current Sanity configuration.'
|
||||||
|
'login:Authenticates against the Sanity.io API.'
|
||||||
|
'logout:Logs out of the Sanity.io session.'
|
||||||
|
'manage:Opens the Sanity project management UI.'
|
||||||
|
'projects:Interact with projects connected to your logged in user.'
|
||||||
|
'start:Starts a web server for the Content Studio.'
|
||||||
|
'undeploy:Removes the deployed studio from <hostname>.sanity.studio.'
|
||||||
|
'uninstall:Removes a Sanity plugin from the current Sanity configuration.'
|
||||||
|
'upgrade:Upgrades all (or some) Sanity modules to their latest versions.'
|
||||||
|
'users:Manage users of your project.'
|
||||||
|
'versions:Shows the installed versions of Sanity CLI and core components.'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -C '*:: :->subcmds' && return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands "sanity subcommand" _1st_arguments
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
|
@ -35,8 +35,14 @@
|
||||||
CURRENT_BG='NONE'
|
CURRENT_BG='NONE'
|
||||||
|
|
||||||
case ${SOLARIZED_THEME:-dark} in
|
case ${SOLARIZED_THEME:-dark} in
|
||||||
light) CURRENT_FG='white';;
|
light)
|
||||||
*) CURRENT_FG='black';;
|
CURRENT_FG='white'
|
||||||
|
CURRENT_DEFAULT_FG='white'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CURRENT_FG='black'
|
||||||
|
CURRENT_DEFAULT_FG='default'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
### Theme Configuration Initialization
|
### Theme Configuration Initialization
|
||||||
|
@ -48,7 +54,7 @@ esac
|
||||||
: ${AGNOSTER_DIR_BG:=blue}
|
: ${AGNOSTER_DIR_BG:=blue}
|
||||||
|
|
||||||
# user@host
|
# user@host
|
||||||
: ${AGNOSTER_CONTEXT_FG:=white}
|
: ${AGNOSTER_CONTEXT_FG:=${CURRENT_DEFAULT_FG}}
|
||||||
: ${AGNOSTER_CONTEXT_BG:=black}
|
: ${AGNOSTER_CONTEXT_BG:=black}
|
||||||
|
|
||||||
# Git related
|
# Git related
|
||||||
|
@ -85,7 +91,7 @@ esac
|
||||||
: ${AGNOSTER_STATUS_RETVAL_FG:=red}
|
: ${AGNOSTER_STATUS_RETVAL_FG:=red}
|
||||||
: ${AGNOSTER_STATUS_ROOT_FG:=yellow}
|
: ${AGNOSTER_STATUS_ROOT_FG:=yellow}
|
||||||
: ${AGNOSTER_STATUS_JOB_FG:=cyan}
|
: ${AGNOSTER_STATUS_JOB_FG:=cyan}
|
||||||
: ${AGNOSTER_STATUS_FG:=white}
|
: ${AGNOSTER_STATUS_FG:=${CURRENT_DEFAULT_FG}}
|
||||||
: ${AGNOSTER_STATUS_BG:=black}
|
: ${AGNOSTER_STATUS_BG:=black}
|
||||||
|
|
||||||
## Non-Color settings - set to 'true' to enable
|
## Non-Color settings - set to 'true' to enable
|
||||||
|
|
Loading…
Reference in New Issue