diff options
author | 2024-03-25 16:43:09 +0530 | |
---|---|---|
committer | 2024-03-25 16:43:09 +0530 | |
commit | a62114c91f2070c8c8453d117f3d81dc113e41ff (patch) | |
tree | f266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/supervisor | |
parent | af120ab348f2e1a5a39dec035ed9dcf84189a64e (diff) | |
download | dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2 dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip |
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/supervisor')
-rw-r--r-- | zsh/oh-my-zsh/plugins/supervisor/README.md | 13 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/supervisor/_supervisorctl | 143 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/supervisor/_supervisord | 33 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/supervisor/supervisor.plugin.zsh | 14 |
4 files changed, 0 insertions, 203 deletions
diff --git a/zsh/oh-my-zsh/plugins/supervisor/README.md b/zsh/oh-my-zsh/plugins/supervisor/README.md deleted file mode 100644 index a060ff4..0000000 --- a/zsh/oh-my-zsh/plugins/supervisor/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# supervisor plugin - -This plugin adds tab-completion for `supervisord`/`supervisorctl` in [Supervisor](http://supervisord.org/). -Supervisor is a client/server system that allows its users to monitor and control a number -of processes on UNIX-like operating systems. - -To use it, add `supervisor` to the plugins array in your zshrc file: - -```zsh -plugins=(... supervisor) -``` - -These scripts are from [zshcompfunc4supervisor](https://bitbucket.org/hhatto/zshcompfunc4supervisor). diff --git a/zsh/oh-my-zsh/plugins/supervisor/_supervisorctl b/zsh/oh-my-zsh/plugins/supervisor/_supervisorctl deleted file mode 100644 index 87cffab..0000000 --- a/zsh/oh-my-zsh/plugins/supervisor/_supervisorctl +++ /dev/null @@ -1,143 +0,0 @@ -#compdef supervisorctl - -typeset -A opt_args -local context state line - -_supervisorctl() { - _arguments -s -S \ - {--configuration,-c}"[configuration file path (default /etc/supervisor.conf)]:FILENAME:_files" \ - {--help,-h}"[print usage message and exit]:" \ - {--interactive,-i}"[start an interactive shell after executing commands]" \ - {--serverurl,-s}"[URL on which supervisord server is listening (default "http://localhost:9001").]" \ - {--username,-u}"[username to use for authentication with server]:USERNAME:_users" \ - {--password,-p}"[password to use for authentication with server]:PASSWORD:" \ - {--history-file,-r}"[keep a readline history (if readline is available)]:FILENAME:_files" \ - "*::supervisorctl commands:_supervisorctl_command" -} - -(( $+functions[_supervisorctl_command] )) || -_supervisorctl_command() { - local cmd ret=1 - - (( $+supervisorctl_cmds )) || _supervisorctl_cmds=( - "add:Activates any updates in config for process/group" \ - "avail:Display all configured processes" \ - "clear:Clear process/multiple-process/all-process log files" \ - "exit:Exit the supervisor shell." \ - "fg:Connect to a process in foreground mode" \ - "maintail:tail of supervisor main log file" \ - "open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)" \ - "pid:Get the PID of supervisord." \ - "quit:Exit the supervisor shell." \ - "reload:Restart the remote supervisord." \ - "remove:Removes process/group from active config" \ - "reread:Reload the daemon's configuration files" \ - "restart:Restart process or group." \ - "shutdown:Shut the remote supervisord down." \ - "start:Start process or groups." \ - "status:Get process status info." \ - "stop:Stop process or group." \ - "tail:tail of process stdout" \ - "update:Reload config and add/remove as necessary" \ - "version:Show the version of the remote supervisord process" \ - "help:Show help" \ - ) - - if (( CURRENT == 1 )); then - _describe -t commands 'supervisorctl subcommand' _supervisorctl_cmds \ - || compadd "$@" - ${(s.:.)${(j.:.)_supervisorctl_syns}} - else - local curcontext="$curcontext" - - cmd="${${_supervisorctl_cmds[(r)$words[1]:*]%%:*}:-${(k)_supervisorctl_syns[(r)(*:|)$words[1](:*|)]}}" - if (( $#cmd )); then - curcontext="${curcontext%:*:*}:supervisorctl-${cmd}:" - _call_function ret _supervisorctl_$cmd || _message 'no more arguments' - else - _message "unknown supervisorctl command: $words[1]" - fi - return ret - fi -} - -# get supervisor contoroll processes -(( $+functions[_get_supervisor_procs] )) || -_get_supervisor_procs() { - local cache_policy - zstyle -s ":completion:${curcontext}:" cache-policy cache_policy - if [[ -z "$cache_policy" ]]; then - zstyle ":completion:${curcontext}:" cache-policy _supervisor_procs_caching_policy - fi - - if ( [[ ${+_supervisor_procs} -eq 0 ]] || _cache_invalid supervisor_procs ) \ - && ! _retrieve_cache supervisor_procs; then - - _supervisor_procs=(${${(f)"$(supervisorctl status >/dev/null 2>&1 | awk -F' ' '{print $1}')"}}) - _store_cache supervisor_procs _supervisor_procs - fi - - local expl - _wanted supervisor_procs expl 'supervisor processes' compadd -a _supervisor_procs -} - -_supervisor_procs_caching_policy() { - local -a oldp - oldp=( "$1"(Nmw+1) ) - (( $#oldp )) -} - -(( $+functions[_supervisorctl_add] )) || -_supervisorctl_add() { - _arguments -s \ - "--help[use help system]" \ - "*::supervisorctl commands:_supervisorctl" -} - -(( $+functions[_supervisorctl_help] )) || -_supervisorctl_help() { - _arguments -s \ - "*:supervisorctl commands:_supervisorctl" -} - -(( $+functions[_supervisorctl_maintail] )) || -_supervisorctl_maintail() { - _arguments -s \ - '-f[Continuous tail of supervisor main log file (Ctrl-C to exit)]' -} - -(( $+functions[_supervisorctl_start] )) || -_supervisorctl_start() { - # TODO: add 'all' - _arguments -s \ - '*::supervisor process:_get_supervisor_procs' -} - -(( $+functions[_supervisorctl_restart] )) || -_supervisorctl_restart() { - # TODO: add 'all' - _arguments -s \ - '*::supervisor process:_get_supervisor_procs' -} - -(( $+functions[_supervisorctl_status] )) || -_supervisorctl_status() { - _arguments \ - '*::supervisor process:_get_supervisor_procs' -} - -(( $+functions[_supervisorctl_stop] )) || -_supervisorctl_stop() { - # TODO: add 'all' - _arguments -s \ - '*::supervisor process:_get_supervisor_procs' -} - -(( $+functions[_supervisorctl_tail] )) || -_supervisorctl_tail() { - # TODO: add 'stderr' - _arguments -s \ - '-f[Continuous tail of named process stdout Ctrl-C to exit.]' \ - '*::supervisor process:_get_supervisor_procs' -} - -_supervisorctl "$@" diff --git a/zsh/oh-my-zsh/plugins/supervisor/_supervisord b/zsh/oh-my-zsh/plugins/supervisor/_supervisord deleted file mode 100644 index e0cb670..0000000 --- a/zsh/oh-my-zsh/plugins/supervisor/_supervisord +++ /dev/null @@ -1,33 +0,0 @@ -#compdef supervisord - -typeset -A opt_args -local context state line - -_arguments \ - {--configuration,-c}"[configuration file]:FILENAME:_files" \ - {--nodaemon,-n}"[run in the foreground (same as 'nodaemon true' in config file)]" \ - {--help,-h}"[print this usage message and exit]:" \ - {--version,-v}"[print supervisord version number and exit]:" \ - {--user,-u}"[run supervisord as this user]:USER:_users" \ - {--umask,-m}"[use this umask for daemon subprocess (default is 022)]" \ - {--directory,-d}"[directory to chdir to when daemonized]" \ - {--logfile,-l}"[use FILENAME as logfile path]:FILENAME:_files" \ - {--logfile_maxbytes,-y}"[use BYTES to limit the max size of logfile]" \ - {--logfile_backups,-z}"[number of backups to keep when max bytes reached]" \ - {--loglevel,-e}"[use LEVEL as log level (debug,info,warn,error,critical)]:level:->levels" \ - {--pidfile,-j}"[write a pid file for the daemon process to FILENAME]:FILENAME:_files" \ - {--identifier,-i}"[identifier used for this instance of supervisord]" \ - {--childlogdir,-q}"[the log directory for child process logs]:child log directory:_files -/" \ - {--nocleanup,-k}"[prevent the process from performing cleanup (removal of old automatic child log files) at startup.]" \ - {--minfds,-a}"[the minimum number of file descriptors for start success]" \ - {--strip_ansi,-t}"[strip ansi escape codes from process output]" \ - "--minprocs[the minimum number of processes available for start success]" \ - "--profile_options[run supervisord under profiler and output results based on OPTIONS, which is a comma-sep'd list of 'cumulative', 'calls', and/or 'callers', e.g. 'cumulative,callers')]" \ - "*::args:_gnu_generic" - -case $state in -levels) - levels=("debug" "info" "warn" "error" "critical") - _describe -t levels 'supervisord levels' levels && return 0 - ;; -esac diff --git a/zsh/oh-my-zsh/plugins/supervisor/supervisor.plugin.zsh b/zsh/oh-my-zsh/plugins/supervisor/supervisor.plugin.zsh deleted file mode 100644 index ad54302..0000000 --- a/zsh/oh-my-zsh/plugins/supervisor/supervisor.plugin.zsh +++ /dev/null @@ -1,14 +0,0 @@ -# DECLARATION: This plugin was created by hhatto. What I did is just making a portal from https://bitbucket.org/hhatto/zshcompfunc4supervisor. - -alias sup='sudo supervisorctl' -alias supad='sudo supervisorctl add' -alias supa='sudo supervisorctl avail' -alias suprl='sudo supervisorctl reload' -alias suprm='sudo supervisorctl remove' -alias suprr='sudo supervisorctl reread' -alias suprs='sudo supervisorctl restart' -alias sups='sudo supervisorctl status' -alias supsr='sudo supervisorctl start' -alias supso='sudo supervisorctl stop' -alias supt='sudo supervisorctl tail' -alias supu='sudo supervisorctl update' |