From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115908 invoked by alias); 30 Jan 2020 00:42:42 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 115893 invoked by uid 89); 30 Jan 2020 00:42:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:U*cygwin, ser, Mine, standing X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 00:42:39 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 00U0gY9H031521; Wed, 29 Jan 2020 16:42:37 -0800 Message-ID: <5E32267A.3010301@tlinx.org> Date: Thu, 30 Jan 2020 00:42:00 -0000 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Jason Pyeron , "cygwin@cygwin.com" Subject: Re: git on mounted CIFS is it Git or Cygwin References: <062b01d5d493$71400640$53c012c0$@pdinc.us> <5E2ED10B.6050601@tlinx.org> <00fe01d5d62e$32c07110$98415330$@pdinc.us> In-Reply-To: <00fe01d5d62e$32c07110$98415330$@pdinc.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00303.txt.bz2 On 2020/01/28 14:56, Jason Pyeron wrote: .... Two short details, ll is an alias commonly used on unix/linux/cygwin most often standing for "ls -l" in its simplest form. Mine does a few other things alias llg='ls -l' #long listing alias ll='llg -gG' # same with user+group turned off lsacl is a shell script I use to get a more convenient and compact form of acl's on linux; laster ported it to cygwin to do the same: Here it is -- feel free to pass it along: --- lsacl --- > cat ~/bin/lsacl #!/bin/bash ## $Id: lsacl,v 1.5 2015-08-02 10:29:25-07 law Exp $ # Version 2 -- try to work with getfacl on cygwin # shopt -s expand_aliases alias int=declare\ -i sub=function string=declare gfacl=$(type -P getfacl) #add cygwin function to return true/false if ! type -f cygwin 2>/dev/null ; then _un_=$(type -P uname) if [[ $_un_ ]] ; then _os_=$($_un_ -o); elif [[ -e /proc/sys/kernel ]]; then _os_=Linux; else _os_=Cygwin; fi if [[ $_os_ =~ Cygwin ]]; then function cygwin () { return 0; } else function cygwin () { return 1; } fi unset _un_ _os_ export -f cygwin fi if cygwin 2>/dev/null ;then [[ $gfacl ]] || { printf "FATAL: Cannot find getfacl in path\n"; exit 1; } sub gfacl () { "$gfacl" "$@"; } else ## linux version has broken semantics requiring "-p" sub gfacl () { "$gfacl" -p "$@" ; } fi export -f gfacl sub facl2str { string fn=${1:?"Need pathname"} string s1='/^\#.*$/d; /^\s*$/d; s/\s*#.*$//; s/^(.)(ser|roup|ask|ther):/\1:/; y/\n/,/' string facl=$(gfacl -a "$fn"|sed -r "$s1"|tr "\n" ",") facl=${facl%,} string dacl=$(gfacl -d "$fn"|sed -r "s/^default://; $s1"|tr "\n" ",") dacl=${dacl%,} printf "[%s/%s]\n" "$facl" "$dacl" } int acllen=0 maxfnln=0 #for fn in "$@" ; do if ((maxfnln<${#fn})); then maxfnln=${#fn}; fi ; done sub acl_str () { if cygwin ;then perm=$(facl2str "$fn") else qfn=$(printf "%q " "$fn") out="$(chacl -l "$fn")" perm="${out#$qfn}" fi printf "%s\n" "$perm" } for fn in "$@"; do int max=40 perm=$(acl_str "$fn") int len=${#perm} if ((len>_acl_len_)); then acllen=len; fi if ((acllen>max)); then acllen=max; fi printf "%-${acllen}s %s\n" "$perm" "$fn" done -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple