diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-11-03 19:44:47 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-11-03 19:44:47 +0000 |
commit | ebc76673aaa9a4f1017a67ae65a1acee10f6bb42 (patch) | |
tree | 80af3ee1ae5b7f1c15f636d85ec91141e033a764 | |
parent | d8207acddbd1ad5e9339115f7b7bf09820b98c5a (diff) | |
download | zsh-ebc76673aaa9a4f1017a67ae65a1acee10f6bb42.tar.gz zsh-ebc76673aaa9a4f1017a67ae65a1acee10f6bb42.tar.xz zsh-ebc76673aaa9a4f1017a67ae65a1acee10f6bb42.zip |
22953: Mikael Magnusson: _most_recent_file fix.
users/10928: send all "jobs" output to stdout
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Completion/Base/Widget/_most_recent_file | 2 | ||||
-rw-r--r-- | Src/jobs.c | 17 |
3 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index c6ebc0d02..7c6a748da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-11-03 Peter Stephenson <pws@csr.com> + + * users/10928: send all "jobs" output to stdout, not shout. + + * 22953: Mikael Magnusson: + Completion/Base/Widget/_most_recent_file: didn't work if + file started with a hyphen. + 2006-11-02 Peter Stephenson <pws@csr.com> * 22952: Src/glob.c, Src/params.c, Src/subst.c, diff --git a/Completion/Base/Widget/_most_recent_file b/Completion/Base/Widget/_most_recent_file index fd13044e8..68d1c91a2 100644 --- a/Completion/Base/Widget/_most_recent_file +++ b/Completion/Base/Widget/_most_recent_file @@ -21,4 +21,4 @@ else eval "file=($PREFIX*$SUFFIX(om[${NUMERIC:-1}]N))" file=(${(q)file}) fi -(( $#file )) && compadd -U -i "$IPREFIX" -I "$ISUFFIX" -f -Q $file +(( $#file )) && compadd -U -i "$IPREFIX" -I "$ISUFFIX" -f -Q -- $file diff --git a/Src/jobs.c b/Src/jobs.c index 5b42a45b0..166314e74 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -954,10 +954,10 @@ printjob(Job jn, int lng, int synch) if ((lng & 4) || (interact && job == thisjob && jn->pwd && strcmp(jn->pwd, pwd))) { - fprintf(shout, "(pwd %s: ", (lng & 4) ? "" : "now"); - fprintdir(((lng & 4) && jn->pwd) ? jn->pwd : pwd, shout); - fprintf(shout, ")\n"); - fflush(shout); + fprintf(fout, "(pwd %s: ", (lng & 4) ? "" : "now"); + fprintdir(((lng & 4) && jn->pwd) ? jn->pwd : pwd, fout); + fprintf(fout, ")\n"); + fflush(fout); } /* delete job if done */ @@ -1827,11 +1827,12 @@ bin_fg(char *name, char **argv, Options ops, int func) printjob(jobtab + job, (stopped) ? -1 : lng, 1); if (func != BIN_BG) { /* fg or wait */ if (jobtab[job].pwd && strcmp(jobtab[job].pwd, pwd)) { - fprintf(shout, "(pwd : "); - fprintdir(jobtab[job].pwd, shout); - fprintf(shout, ")\n"); + FILE *fout = (func == BIN_JOBS) ? stdout : shout; + fprintf(fout, "(pwd : "); + fprintdir(jobtab[job].pwd, fout); + fprintf(fout, ")\n"); + fflush(fout); } - fflush(shout); if (func != BIN_WAIT) { /* fg */ thisjob = job; if ((jobtab[job].stat & STAT_SUPERJOB) && |