From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: relative path
Date: Wed, 21 Feb 2018 18:16:28 -0800 [thread overview]
Message-ID: <e2a53cb0-3c84-7d5b-fea7-26ca811e9964@eastlink.ca> (raw)
In-Reply-To: <54a8ff5c-cf34-6761-226a-64a5ea9b3730@eastlink.ca>
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
prev parent reply other threads:[~2018-02-22 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 21:53 Ray Andrews
2018-02-22 2:16 ` Ray Andrews [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2a53cb0-3c84-7d5b-fea7-26ca811e9964@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).