Server IP : 51.89.169.208 / Your IP : 216.73.216.211 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/usr/share/zsh/5.5.1/functions/ |
Upload File : |
#compdef scselect local ret=1 u l local -a context line state state_descr tmp loc1 loc2 local -A opt_args _arguments -s -S : \ '-n[delay changing until next boot]' \ '1: :->locations' \ && ret=0 [[ $state == locations ]] && { # For some reason scselect expects location names to be encoded in Mac OS # Roman; in order to prevent completed arguments from breaking the tool, we'll # insert the UUID instead if the name would contain incompatible characters tmp=( ${(f)"$( command $service 2> /dev/null )"} ) tmp=( ${tmp[2,-1]} ) tmp=( ${tmp##[*[:space:]]##} ) tmp=( ${tmp//:/\\:} ) tmp=( ${tmp/[[:space:]]##\(/$'\0'} ) tmp=( ${tmp%\)} ) for u l in "${(@0)tmp}"; do loc1+=( "${l}:${u}" ) if [[ $l == [[:ascii:]]## ]]; then loc2+=( $l ) else loc2+=( $u ) fi done if (( $#loc1 )); then _describe location loc1 loc2 && ret=0 else _message location && ret=0 fi } return ret