mirror of
https://github.com/akelge/vim
synced 2025-07-12 17:42:09 +00:00
New version of zshrc, that uses /Network/Library/zsh.d
This commit is contained in:
23
zsh.d/30-dsFunctions
Normal file
23
zsh.d/30-dsFunctions
Normal file
@ -0,0 +1,23 @@
|
||||
BASE='/LDAPv3/dioniso.cube.lan'
|
||||
KEYWORD="desktop"
|
||||
|
||||
function dsComputerUserList {
|
||||
for c in `dscl $BASE -search Computers Keywords desktop|grep Keywords|cut -f1|sort`; do
|
||||
echo -n $c:
|
||||
dscl $BASE -read Computers/$c Comment|cut -d: -f3
|
||||
done
|
||||
}
|
||||
|
||||
function dsComputerList {
|
||||
for c in `dsComputerUserList`; do
|
||||
echo $c|cut -d: -f1
|
||||
done
|
||||
}
|
||||
|
||||
function dsUser {
|
||||
COMPUTER=${1-`dscl . -list Computers|grep -v localhost`}
|
||||
dsComputerUserList| grep -i $COMPUTER|cut -d: -f2
|
||||
}
|
||||
|
||||
unset BASE
|
||||
unset KEYWORD
|
Reference in New Issue
Block a user