Execute a block of commands without keeping it in shell history (zsh)

CMCDragonkai

I know you can avoid keeping the command in history if you use setopt HIST_IGNORE_SPACE. But what about a block of commands?

Imagine I write something like:

nohistorystart
...cmds...
nohistoryend

Or something that starts a prompt.

Joshua Goldberg

From this answer, you can push/pop a new history, not associated with a save file. (Note the capitals.)

fc -p 
...cmds...
fc -P

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Execute a block of commands without keeping it in shell history (zsh)

From Dev

How to remove unknown commands from shell terminal history (zsh)

From Dev

Shell out into zsh and execute commands from bash script

From Dev

How to run encryption commands on linux without shell history logging

From Dev

Share history in multiple zsh shell

From Dev

Python Execute Shell commands without having a terminal open

From Dev

Execute a range of commands from history

From Dev

Execute shell commands in Python

From Dev

Jenkins - Block "Execute shell"

From Dev

zsh history: comment out dangerous commands: `#`

From Dev

ZSH avoid adding empty commands to history?

From Dev

Jenkins - Execute shell commands with wildcards

From Dev

execute commands as parameters in a login shell

From Dev

Is there any way to execute commands from history?

From Dev

How to execute consecutive commands from history?

From Dev

Execute a shell script without `./`

From Dev

Jenkins - can the "Execute Shell" execute SSH commands

From Dev

Cannot execute shell /bin/zsh when execute a shell command in vi

From Dev

Archive history without exiting the shell

From Dev

How to draw a line between commands in zsh shell

From Dev

Is there a way to show the history of the commands used in the shell?

From Dev

pass multiple commands for cmd to execute as one block

From Dev

Keeping history per working directory (cf. per shell session)

From Dev

Execute history or fc from script or non-interactive zsh instance

From Dev

Execute a python script without the shell

From Dev

how to commit file without keeping modification history on svn

From Dev

Cannot execute shell commands in bash script

From Java

How to execute mongo commands through shell scripts?

From Dev

Clojure: how to execute shell commands with piping?

Related Related

  1. 1

    Execute a block of commands without keeping it in shell history (zsh)

  2. 2

    How to remove unknown commands from shell terminal history (zsh)

  3. 3

    Shell out into zsh and execute commands from bash script

  4. 4

    How to run encryption commands on linux without shell history logging

  5. 5

    Share history in multiple zsh shell

  6. 6

    Python Execute Shell commands without having a terminal open

  7. 7

    Execute a range of commands from history

  8. 8

    Execute shell commands in Python

  9. 9

    Jenkins - Block "Execute shell"

  10. 10

    zsh history: comment out dangerous commands: `#`

  11. 11

    ZSH avoid adding empty commands to history?

  12. 12

    Jenkins - Execute shell commands with wildcards

  13. 13

    execute commands as parameters in a login shell

  14. 14

    Is there any way to execute commands from history?

  15. 15

    How to execute consecutive commands from history?

  16. 16

    Execute a shell script without `./`

  17. 17

    Jenkins - can the "Execute Shell" execute SSH commands

  18. 18

    Cannot execute shell /bin/zsh when execute a shell command in vi

  19. 19

    Archive history without exiting the shell

  20. 20

    How to draw a line between commands in zsh shell

  21. 21

    Is there a way to show the history of the commands used in the shell?

  22. 22

    pass multiple commands for cmd to execute as one block

  23. 23

    Keeping history per working directory (cf. per shell session)

  24. 24

    Execute history or fc from script or non-interactive zsh instance

  25. 25

    Execute a python script without the shell

  26. 26

    how to commit file without keeping modification history on svn

  27. 27

    Cannot execute shell commands in bash script

  28. 28

    How to execute mongo commands through shell scripts?

  29. 29

    Clojure: how to execute shell commands with piping?

HotTag

Archive