<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>@sikac.hu</title>
 <link href="/atom.xml" rel="self"/>
 <link href="https://sikac.hu/"/>
 <updated>2026-10-25T07:25:52+00:00</updated>
 <id>https://sikac.hu</id>
 <author>
   <name>Prem Sichanugrist</name>
 </author>

 
 <entry>
   <title>A faster way to exit a Pry session</title>
   <link href="https://sikac.hu/exit-pry-session-with-bang-bang-bang"/>
   <updated>2018-06-01T14:01:01+00:00</updated>
   <id>https://sikac.hu/exit-pry-session-with-bang-bang-bang</id>
   <content type="html">&lt;p&gt;If you are using Pry in your project,
you might run into a situation where you are in a loop or
have multiple &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;binding.pry&lt;/code&gt; calls
so you have to use exit multiple times to get out of it.&lt;/p&gt;

&lt;p&gt;So, instead of using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit&lt;/code&gt; multiple times,
you can use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit-program&lt;/code&gt; to continue the execution
without breaking into Pry again.&lt;/p&gt;

&lt;p&gt;There is also a handy shortcut for this, which is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!!!&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can read more about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit-program&lt;/code&gt;
and other ways to navigate around in your Pry session
in &lt;a href=&quot;https://github.com/pry/pry/wiki/State-navigation#exit-the-program-completely&quot;&gt;Pry’s wiki page&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>How to keep sensitive commands out of .zsh_history</title>
   <link href="https://sikac.hu/how-to-keep-sensitive-commands-out-of-zsh-history"/>
   <updated>2015-11-09T01:49:01+00:00</updated>
   <id>https://sikac.hu/how-to-keep-sensitive-commands-out-of-zsh-history</id>
   <content type="html">&lt;p&gt;By default,
if you enable command history in Zsh,
all commands including those that contain sensitive information
such as an access token or a password
will be saved into your command history file after you run them.&lt;/p&gt;

&lt;p&gt;It’s definitely a bad idea to have that information
wound up in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zsh_history&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;However,
there is a way you can tell Zsh to not putting a command in your history file
by setting this option in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zshrc&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-zsh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;setopt HIST_IGNORE_SPACE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After that,
Zsh will not store any command that starts with a space in a history file.&lt;/p&gt;

&lt;p&gt;So, instead of running this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ curl -u &quot;LOLNOPE:x-oauth-basic&quot; -i https://api.github.com/...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;add an empty space before your command like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$  curl -u &quot;LOLNOPE:x-oauth-basic&quot; -i https://api.github.com/...
  ^--------- notice an empty space here
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note that this most recent command &lt;em&gt;will&lt;/em&gt; temporarily stay in the command history
in your current session
so you can go back to reuse or edit it by using the UP arrow,
and it will automatically disappear
after you run another command in the same session.&lt;/p&gt;

&lt;p&gt;You can read more about this in &lt;a href=&quot;https://zsh.sourceforge.io/Doc/Release/Options.html&quot;&gt;Zsh documentation&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 

</feed>
