Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: relative path
On 21/02/18 01:53 PM, Ray Andrews wrote:
path. I think there is, I have a niggling I've used it but I can't
remember.
_full=${0:a}
function my_function ()
{
_vvar=`whence -v $0 | cut --delimiter=' ' --fields=7-`
_ooutput=`ls -g --time-style=+%F/%T $_full | cut --delimiter=' '
--fields=5-`
echo -e "Function: $0 \nFile: $_ooutput"
}
Ha! I knew about " ${0:a} " but I thought it only applied to functions.
Clever thing reports the absolute path of files too:
$ my_function
Function: my_function
File: 2018-02-21/18:04:30 /aWorking/Zsh/Source/Wk/test
Messages sorted by:
Reverse Date,
Date,
Thread,
Author