Server IP : 51.89.169.208 / Your IP : 216.73.216.126 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 : /usr/share/zsh/5.5.1/functions/ |
Upload File : |
# Call this from the preexec function like so: # preexec() { # getjobs "${(z)2}" # Use "${(z)1}" prior to zsh-4.0.1 # } setopt localoptions noshwordsplit noksharrays local texts case $1 in fg|bg) shift; [[ -n $1 ]] || set -- %% ;; %*) ;; *) return 0 ;; esac repeat $# do # This case statement emulates jobs.c:getjob() case $1 in [\;\&\|]|\|\||\&\&) break ;; %(|[%+])) 1=${(k)jobstates[(r)*:+:*]} ;; %-) 1=${(k)jobstates[(r)*:-:*]} ;; %<->) 1=${1#%} ;; %[?]*) 1=${${(Ok)jobtexts[(R)*${1#%[?]}*]}[1]} ;; *) 1=${${(Ok)jobtexts[(R)$1*]}[1]} ;; esac [[ -n $1 ]] && texts=($texts ${jobtexts[$1]}) shift done # Remove the "-s" below if you'd prefer that this just report # what jobs are being affected rather than modify the history (( $#texts )) && print -s ${(j:; :)texts} "$*" return 0