zsh-users
 help / color / mirror / code / Atom feed
From: "x x" <pbyrne76@hotmail.com>
To: zsh-users@sunsite.dk
Subject: exec problem
Date: Tue, 26 Nov 2002 13:31:25 +0000	[thread overview]
Message-ID: <F79APNXRPmcarcR4ZDg00026268@hotmail.com> (raw)

In 4.0.4 when I issue an 'exec' and zsh can't find
the executable it simply terminates without warning.
This is surly not desirable behaviour.

In bash the shell first checks to see if the command
is available and executable and if not it issues an
appropriate error message. The following function approximates
the bash bahaviour.

function exec {
  if [[ $# = 0 ]]; then
    builtin exec
  elif [[ -f $1 ]]; then
    if [[ -x $1 ]]; then
      builtin exec $*
    else
      echo "zsh: exec: $1: cannot execute: Permission denied"
    fi
  else
    echo "zsh: exec: $1: cannot execute: No such file or directory"
  fi
}

Shouldn't this be builtin?


Thanks,
Pascal


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail




             reply	other threads:[~2002-11-26 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-26 13:31 x x [this message]
2002-11-26 16:55 ` John Buttery
2002-11-26 17:51 ` Dan Nelson
2002-11-26 17:41 x x
2002-11-26 18:38 ` John Buttery

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=F79APNXRPmcarcR4ZDg00026268@hotmail.com \
    --to=pbyrne76@hotmail.com \
    --cc=zsh-users@sunsite.dk \
    /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).