From 911edc5ea475bdf679feee7c800369d8285c263d Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sat, 30 May 2015 15:22:09 -0700 Subject: users/20238: add "fc -L" to operate only on the local shell history Also avoid invoking the editor on empty results. --- Doc/Zsh/builtins.yo | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Doc/Zsh') diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index f8e4edf91..1fcc7c2b7 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -662,8 +662,8 @@ findex(fc) cindex(history, editing) cindex(editing history) redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ ))ifnztexi( ))) -xitem(tt(fc) [ tt(-e) var(ename) ] [ tt(-m) var(match) ] [ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) -xitem(tt(fc -l )[ tt(-nrdfEiD) ] [ tt(-t) var(timefmt) ] [ tt(-m) var(match) ]) +xitem(tt(fc) [ tt(-e) var(ename) ] [-L] [ tt(-m) var(match) ] [ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) +xitem(tt(fc -l )[ tt(-LnrdfEiD) ] [ tt(-t) var(timefmt) ] [ tt(-m) var(match) ]) xitem(SPACES()[ var(old)tt(=)var(new) ... ] [ var(first) [ var(last) ] ]) xitem(tt(fc -p )[ tt(-a) ] [ var(filename) [ var(histsize) [ var(savehistsize) ] ] ]) xitem(tt(fc) tt(-P)) @@ -683,11 +683,15 @@ A string specifies the most recent event beginning with the given string. All substitutions var(old)tt(=)var(new), if any, are then performed on the commands. -If the tt(-l) flag is given, the resulting commands are listed on -standard output. -If the tt(-m) flag is also given the first argument is taken as a +If the tt(-L) flag is given, only the local history is considered (see +tt(SHARE_HISTORY) in ifzman(zmanref(zshoptions))\ +ifnzman(noderef(Description of Options))). +If the tt(-m) flag is given, the first argument is taken as a pattern (should be quoted) and only the history events matching this -pattern will be shown. +pattern are considered. + +When the tt(-l) flag is given, the resulting commands are listed on +standard output. Otherwise the editor program var(ename) is invoked on a file containing these history events. If var(ename) is not given, the value of the parameter tt(FCEDIT) is used; if that is not set the value of the -- cgit 1.4.1