<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Shell on CuSO4_Deposit</title><link>https://depoze.xyz/en/tags/shell/</link><description>Recent content in Shell on CuSO4_Deposit</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 28 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://depoze.xyz/en/tags/shell/index.xml" rel="self" type="application/rss+xml"/><item><title>An alternative solution to direnv dropping aliases and functions</title><link>https://depoze.xyz/en/pages/direnv-aliases/</link><pubDate>Sun, 12 Oct 2025 00:00:00 +0000</pubDate><guid>https://depoze.xyz/en/pages/direnv-aliases/</guid><description>Direnv&amp;rsquo;s inability to export shell-specific aliases and functions, due to its shell-agnostic design, can be addressed in Nix by using pkgs.writeScriptBin to create executable scripts instead.</description></item><item><title>Manipulating Directories - Shell Builtins cd pushd and popd</title><link>https://depoze.xyz/en/pages/cd-pushd-popd/</link><pubDate>Thu, 04 Sep 2025 00:00:00 +0000</pubDate><guid>https://depoze.xyz/en/pages/cd-pushd-popd/</guid><description>&lt;p&gt;Most modern shells have a set of shell builtins (e.g. &lt;a href="https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html"&gt;zsh&lt;/a&gt;), some of which can be used to manipulate directories.&lt;/p&gt;&#10;&lt;p&gt;To manipulate directories, a directory stack structure is maintained in memory. In bash it can also be accessed through the &lt;code&gt;$DIRSTACK&lt;/code&gt; shell variable. &lt;a href="https://www.gnu.org/software/bash/manual/html_node/The-Directory-Stack.html#The-Directory-Stack"&gt;bash&amp;rsquo;s introduction to the directory stack&lt;/a&gt;, &lt;a href="https://zsh.sourceforge.io/Intro/intro_6.html#SEC6"&gt;zsh&amp;rsquo;s introduction to the directory stack&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;With pushd and popd, you can enter a series of directories and leave them in reverse order.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;[1:cuso4d@nightcord-laborari:~]&#10;$ pwd&#10;/home/cuso4d&#10;[1:cuso4d@nightcord-laborari:~]&#10;$ pushd ~/source/zsh&#10;~/source/zsh ~&#10;[1:cuso4d@nightcord-laborari:~/source/zsh on master]&#10;$ pushd ~/.ssh&#10;~/.ssh ~/source/zsh ~&#10;[1:cuso4d@nightcord-laborari:~/.ssh]&#10;$ popd&#10;~/source/zsh ~&#10;[1:cuso4d@nightcord-laborari:~/source/zsh on master]&#10;$ popd&#10;~&#10;[1:cuso4d@nightcord-laborari:~]&#10;$ pwd&#10;/home/cuso4d&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Taking zsh as an example, the directory stack is implemented as a linked list. It is located in &lt;code&gt;Src/Bulitin.c&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>