Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Preventing a single command from being saved in history
- X-seq: zsh-users 13866
- From: Allan Caffee <allan.caffee@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Preventing a single command from being saved in history
- Date: Wed, 18 Feb 2009 11:19:47 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=mSR/hHP36uGm/Sish14zLyX30ik/cWPGzkQUtrREEI4=; b=NsfkfpjjTGTwslqrX9oNJNF5WxS0UnnbOdscHIrKqnTc0ue9uUOUYfX9dDOePO0k3J vpsw306S9g/UuFEvEM7BiVu/6XwSPMGSddEfIGksoAXOlsTR8X+1o4qs/RXb1ad5RgBg tTdI5IvPfwT1652Oh5pmMVHOeRmDUVTCVm4g8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=Q8SAolZjiUaaOPqLZB0Eu3LTrT+6cmPuwXHtZRCprGR/XE4Akz6ujBUOv1RVNJXC8d cjYQvBqVwxFhkcPypfU+fimd32aJHeIQIzUgsYC11c0twzqwZ3LsB4W2Y2zK3kJKEi37 IPZl0NeDGng/RJPkRQE5COb1dL+dlc2iXOeoI=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Is there a way to prevent an arbitrary command line from being stored in
the shell history (for any longer than one command)? A use of this for
example might be if I were to set a password into the environment or
pass some sensitive information to a program on the command line.
If this functionality does not currently exist how difficult would it be
to provide a precommand modifier? I know the internals for this kind of
manipulation are already in place for options like HistNoStore and
HistNoFunctions. I've only glanced over the source code but it seems
like all that would be needed is to have should_ignore_line return 1 if
the precommand modifier is in effect.
Regards,
Allan
P.S. Yes. I'm well aware of how insecure putting sensitive information
into the environment or on a command line is. Consider your obligation
to warn me hereby fulfilled. :P
Messages sorted by:
Reverse Date,
Date,
Thread,
Author