tag:blogger.com,1999:blog-3939164541028317159.post1276428943571326692..comments2023-05-25T09:20:09.110-06:00Comments on Raphael's blog: A bashism a week: function namesUnknownnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3939164541028317159.post-91172576694970096872013-10-21T16:32:11.096-05:002013-10-21T16:32:11.096-05:00In my blogpost about shell aliases I gave a bit mo...In my blogpost about <a href="http://rgeissert.blogspot.com/2013/09/a-bashism-week-aliases.html" rel="nofollow">shell aliases</a> I gave a bit more details: they are an extension (note the XSI marker).Raphael Geisserthttps://www.blogger.com/profile/13007419250201863744noreply@blogger.comtag:blogger.com,1999:blog-3939164541028317159.post-21829533694955285642013-10-20T17:42:53.775-05:002013-10-20T17:42:53.775-05:00Sorry, just found out about your reply today ...
...Sorry, just found out about your reply today ...<br /><br />According to http://pubs.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_03_01 aliases actually seem to be in the POSIX standard.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3939164541028317159.post-5417122747868131272013-09-17T16:29:39.035-05:002013-09-17T16:29:39.035-05:00Apologies for responding until now.
There are thr...Apologies for responding until now.<br /><br />There are three problems with that:<br />1. Aliases are not POSIX :-)<br />2. Aliases are not functions (yeah, being picky here for the fun)<br />3. Aliases are not expanded in bash in non-interactive mode. You need to setopt first, in which case you could as well just use a non-standard function name.<br />Raphael Geisserthttps://www.blogger.com/profile/13007419250201863744noreply@blogger.comtag:blogger.com,1999:blog-3939164541028317159.post-70781558857288559212013-08-21T16:00:45.813-05:002013-08-21T16:00:45.813-05:00Defining a function _run_parts followed by:
alias...Defining a function _run_parts followed by:<br /><br />alias run-parts=_run_parts<br /><br />should work with a non-bash shell ...<br />Detlef Lnoreply@blogger.comtag:blogger.com,1999:blog-3939164541028317159.post-55374262633619393842013-08-21T05:23:08.775-05:002013-08-21T05:23:08.775-05:00Indeed, thanks. I've now update the post.Indeed, thanks. I've now update the post.Raphael Geisserthttps://www.blogger.com/profile/13007419250201863744noreply@blogger.comtag:blogger.com,1999:blog-3939164541028317159.post-35847512291445273982013-08-21T03:06:39.442-05:002013-08-21T03:06:39.442-05:00You probably should quote the arguments:
function...You probably should quote the arguments:<br /><br />function @ { "$@" > /dev/null ; }Paul Hedderlynoreply@blogger.com