From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: repeat the last single shell command Date: Thu, 18 Jul 2013 16:12:17 +0200 Message-ID: <8738rcx8hq.fsf@yahoo.fr> References: <878v14t3lp.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374156744 9139 80.91.229.3 (18 Jul 2013 14:12:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jul 2013 14:12:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 18 16:12:24 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UzowQ-0002mT-UJ for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2013 16:12:23 +0200 Original-Received: from localhost ([::1]:57452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzowQ-0003vc-En for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2013 10:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzowB-0003nu-FS for help-gnu-emacs@gnu.org; Thu, 18 Jul 2013 10:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uzow6-0003UC-Tr for help-gnu-emacs@gnu.org; Thu, 18 Jul 2013 10:12:07 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:46242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uzow6-0003Ta-OW; Thu, 18 Jul 2013 10:12:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAGP251GkD4Nx/2dsb2JhbABasReTN4EkdIIlAQV5EAgDDhMlDwEESROHfQESpSWHRgGJNZAPB4N8A5ddhhCLPYMUOg Original-Received: from geodiff-mac3.ulb.ac.be (HELO geodiff-mac3) ([164.15.131.113]) by smtp.ulb.ac.be with ESMTP; 18 Jul 2013 16:12:01 +0200 In-Reply-To: <878v14t3lp.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Thu, 18 Jul 2013 15:11:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92234 Archived-At: Tassilo Horn writes: > You can capture the last shell command using an advice, and have a > command for repeating it, though. Since a history is maintained accross invocations, there must be a variable holding that, already. Its name is shell-command-history ; its (car) holds the last command. -- Nico.