Server IP : 51.89.169.208 / Your IP : 216.73.216.94 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/proc/thread-self/root/usr/share/zsh/5.5.1/functions/ |
Upload File : |
#compdef defaults _defaults_domains(){ if [[ "`eval echo $PREFIX`" != [/~]* ]]; then local str="$(_call_program domains defaults domains 2>/dev/null)" local expl local -a list list=( ${(s/, /)str} -g -globalDomain ) _wanted domains expl 'defaults database domain' \ compadd -M 'r:|.=* r:|=*' -a list else _files -g '*.plist(-.:r)' fi } _defaults_keys(){ local ks ks=(${${${${(M)${(f)"$(defaults read "$words[2]" 2>/dev/null)"}:# [^ ]*=*}# }%% = *}:Q}) local expl _wanted keys expl 'key' compadd "$ks[@]" } _defaults(){ local -a _1st_arguments _1st_arguments=( read read-type write rename delete domains find help ) local curcontext="$curcontext" state line expl typeset -A opt_args _arguments -C -A '-*' \ '(-currentHost)-host:host:_hosts' \ '(-host)-currentHost' \ '*::command:->subcmd' && return 0 if (( CURRENT == 1 )); then _describe -t commands "command" _1st_arguments return fi case $words[1] in read|read-type|delete) _arguments \ "(1)-app:application:_mac_applications" \ "(-app)1:domain:_defaults_domains" \ "2:keys:_defaults_keys" ;; write) _arguments \ "(1)-app:application:_mac_applications" \ "(-app)1:domain:_defaults_domains" \ "2:key:_defaults_keys" \ "*::value" ;; rename) _arguments \ "(1)-app:application:_mac_applications" \ "(-app)1:domain:_defaults_domains" \ "2:old key:_defaults_keys" \ "3:new key:_defaults_keys" ;; domains|help) ;; find) _message word ;; *) _message "unknown defaults command: $words[1]" ;; esac } _defaults "$@"