snipt

Ctrl+h for KB shortcuts

Bash

pushd shortcuts.

1
2
3
4
5
6
7
8
9
alias pi="pushd \`pwd\`"
alias pu="pushd"
alias po="popd"
alias 1="pushd"
alias 2="pushd +2"
alias 3="pushd +3"
alias 4="pushd +4"
alias 5="pushd +5"
alias 6="pushd +6"
https://snipt.net/embed/47839748a815fba5789d8be1c397e1a9/
/raw/47839748a815fba5789d8be1c397e1a9/
47839748a815fba5789d8be1c397e1a9
bash
Bash
10
2019-06-26T13:48:33
True
False
False
/api/public/snipt/498/
pushd-shortcuts
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a> <a href="#L-9">9</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">alias</span> <span class="nv">pi</span><span class="o">=</span><span class="s2">&quot;pushd \`pwd\`&quot;</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">alias</span> <span class="nv">pu</span><span class="o">=</span><span class="s2">&quot;pushd&quot;</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">alias</span> <span class="nv">po</span><span class="o">=</span><span class="s2">&quot;popd&quot;</span> </span><span id="L-4"><a name="L-4"></a><span class="nb">alias</span> <span class="nv">1</span><span class="o">=</span><span class="s2">&quot;pushd&quot;</span> </span><span id="L-5"><a name="L-5"></a><span class="nb">alias</span> <span class="nv">2</span><span class="o">=</span><span class="s2">&quot;pushd +2&quot;</span> </span><span id="L-6"><a name="L-6"></a><span class="nb">alias</span> <span class="nv">3</span><span class="o">=</span><span class="s2">&quot;pushd +3&quot;</span> </span><span id="L-7"><a name="L-7"></a><span class="nb">alias</span> <span class="nv">4</span><span class="o">=</span><span class="s2">&quot;pushd +4&quot;</span> </span><span id="L-8"><a name="L-8"></a><span class="nb">alias</span> <span class="nv">5</span><span class="o">=</span><span class="s2">&quot;pushd +5&quot;</span> </span><span id="L-9"><a name="L-9"></a><span class="nb">alias</span> <span class="nv">6</span><span class="o">=</span><span class="s2">&quot;pushd +6&quot;</span> </span></pre></div> </td></tr></table>
bash, directory, shortcuts