<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: shell</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/shell.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2024-10-15T15:25:07+00:00</updated><author><name>Simon Willison</name></author><entry><title>PATH tips on wizard zines</title><link href="https://simonwillison.net/2024/Oct/15/path-tips-on-wizard-zines/#atom-tag" rel="alternate"/><published>2024-10-15T15:25:07+00:00</published><updated>2024-10-15T15:25:07+00:00</updated><id>https://simonwillison.net/2024/Oct/15/path-tips-on-wizard-zines/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://wizardzines.com/comics/path-tips/"&gt;PATH tips on wizard zines&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
New Julia Evans comic, from which I learned that the &lt;code&gt;which -a X&lt;/code&gt; command shows you &lt;strong&gt;all&lt;/strong&gt; of the versions of that command that are available in the directories on your current &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is so useful! I used it to explore my currently available Python versions:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ which -a python    
/opt/homebrew/Caskroom/miniconda/base/bin/python
$ which -a python3
/opt/homebrew/Caskroom/miniconda/base/bin/python3
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3
/opt/homebrew/bin/python3
/usr/local/bin/python3
/usr/bin/python3
/Users/simon/Library/Application Support/hatch/pythons/3.12/python/bin/python3
/Users/simon/Library/Application Support/hatch/pythons/3.12/python/bin/python3
$ which -a python3.10
/opt/homebrew/Caskroom/miniconda/base/bin/python3.10
/opt/homebrew/bin/python3.10
$ which -a python3.11
/opt/homebrew/bin/python3.11
$ which -a python3.12
/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
/opt/homebrew/bin/python3.12
/usr/local/bin/python3.12
/Users/simon/Library/Application Support/hatch/pythons/3.12/python/bin/python3.12
/Users/simon/Library/Application Support/hatch/pythons/3.12/python/bin/python3.12
$ which -a python3.13
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13
/opt/homebrew/bin/python3.13
/usr/local/bin/python3.13
&lt;/code&gt;&lt;/pre&gt;

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://bsky.app/profile/b0rk.jvns.ca/post/3l6kp3nuy7h2z"&gt;Bluesky, though actually via Julia&amp;#x27;s fed.brid.gy relay on Mastodon&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/julia-evans"&gt;julia-evans&lt;/a&gt;&lt;/p&gt;



</summary><category term="python"/><category term="shell"/><category term="julia-evans"/></entry><entry><title>Shell History Is Your Best Productivity Tool</title><link href="https://simonwillison.net/2024/Apr/10/shell-history-is-your-best-productivity-tool/#atom-tag" rel="alternate"/><published>2024-04-10T23:17:59+00:00</published><updated>2024-04-10T23:17:59+00:00</updated><id>https://simonwillison.net/2024/Apr/10/shell-history-is-your-best-productivity-tool/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://martinheinz.dev/blog/110"&gt;Shell History Is Your Best Productivity Tool&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Martin Heinz drops a wealth of knowledge about ways to configure zsh (the default shell on macOS these days) to get better utility from your shell history.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://lobste.rs/s/zfcis3/shell_history_is_your_best_productivity"&gt;lobste.rs&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/productivity"&gt;productivity&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/zsh"&gt;zsh&lt;/a&gt;&lt;/p&gt;



</summary><category term="productivity"/><category term="shell"/><category term="zsh"/></entry><entry><title>pyp: Easily run Python at the shell</title><link href="https://simonwillison.net/2020/May/9/pyp/#atom-tag" rel="alternate"/><published>2020-05-09T21:05:21+00:00</published><updated>2020-05-09T21:05:21+00:00</updated><id>https://simonwillison.net/2020/May/9/pyp/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/hauntsaninja/pyp"&gt;pyp: Easily run Python at the shell&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Fascinating little CLI utility which uses some deeply clever AST introspection to enable little Python one-liners that act as replacements for all manner of pipe-oriented unix utilities. Took me a while to understand how it works from the README, but then I looked at the code and the entire thing is only 380 lines long. There’s also a useful --explain option which outputs the Python source code that it would execute for a given command.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=23127628"&gt;Show HN&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/cli"&gt;cli&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;&lt;/p&gt;



</summary><category term="cli"/><category term="python"/><category term="shell"/></entry><entry><title>direnv</title><link href="https://simonwillison.net/2017/Nov/5/direnvdirenv-unclutter-your-profile/#atom-tag" rel="alternate"/><published>2017-11-05T19:59:35+00:00</published><updated>2017-11-05T19:59:35+00:00</updated><id>https://simonwillison.net/2017/Nov/5/direnvdirenv-unclutter-your-profile/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/direnv/direnv"&gt;direnv&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A shell extension (for bash, zsh and others) which can automatically set and unset environment variables when you cd into specific directories. Useful for managing things like a project’s GOPATH or automatically activating Python virtual environments.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://speakerdeck.com/farslan/go-at-digitalocean?slide=32"&gt;Go at DigitalOcean&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bash"&gt;bash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/zsh"&gt;zsh&lt;/a&gt;&lt;/p&gt;



</summary><category term="bash"/><category term="shell"/><category term="zsh"/></entry><entry><title>What is a good programming language to learn after bash scripting?</title><link href="https://simonwillison.net/2012/Jan/13/what-is-a-good/#atom-tag" rel="alternate"/><published>2012-01-13T16:45:00+00:00</published><updated>2012-01-13T16:45:00+00:00</updated><id>https://simonwillison.net/2012/Jan/13/what-is-a-good/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/What-is-a-good-programming-language-to-learn-after-bash-scripting/answer/Simon-Willison"&gt;What is a good programming language to learn after bash scripting?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Python is a good natural progression from bash in my opinion. It has an interactive prompt which supports bash-style exploratory programming, and it has libraries that mean it can be applied to an enormous range of problems - everything from game development to scientific computing to web applications.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bash"&gt;bash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="bash"/><category term="programming"/><category term="shell"/><category term="quora"/></entry><entry><title>shunit2</title><link href="https://simonwillison.net/2009/Sep/27/shunit/#atom-tag" rel="alternate"/><published>2009-09-27T19:34:03+00:00</published><updated>2009-09-27T19:34:03+00:00</updated><id>https://simonwillison.net/2009/Sep/27/shunit/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.google.com/p/shunit2/"&gt;shunit2&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
xUnit style testing for shell scripts.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://delicious.com/jacobian/xunit+bash"&gt;Jacob Kaplan-Moss&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bash"&gt;bash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shunit2"&gt;shunit2&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/testing"&gt;testing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/unix"&gt;unix&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xunit"&gt;xunit&lt;/a&gt;&lt;/p&gt;



</summary><category term="bash"/><category term="shell"/><category term="shunit2"/><category term="testing"/><category term="unix"/><category term="xunit"/></entry><entry><title>Insert Dojo and YUI bookmarklets</title><link href="https://simonwillison.net/2007/Dec/9/morethanseven/#atom-tag" rel="alternate"/><published>2007-12-09T12:38:03+00:00</published><updated>2007-12-09T12:38:03+00:00</updated><id>https://simonwillison.net/2007/Dec/9/morethanseven/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://morethanseven.net/posts/insert-dojo-and-yui-bookmarklets/"&gt;Insert Dojo and YUI bookmarklets&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Combine with Jash for interactive API experimentation on any web page.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bookmarklets"&gt;bookmarklets&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dojo"&gt;dojo&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gareth-rushgrove"&gt;gareth-rushgrove&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jash"&gt;jash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/yui"&gt;yui&lt;/a&gt;&lt;/p&gt;



</summary><category term="bookmarklets"/><category term="dojo"/><category term="gareth-rushgrove"/><category term="jash"/><category term="javascript"/><category term="shell"/><category term="yui"/></entry><entry><title>Jash: JavaScript Shell</title><link href="https://simonwillison.net/2007/Dec/9/jash/#atom-tag" rel="alternate"/><published>2007-12-09T12:36:51+00:00</published><updated>2007-12-09T12:36:51+00:00</updated><id>https://simonwillison.net/2007/Dec/9/jash/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.billyreisinger.com/jash/"&gt;Jash: JavaScript Shell&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
An advanced JavaScript interactive shell bookmarklet that works in IE, Firefox, Opera and Safari.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="http://morethanseven.net/posts/debug-web-pages-with-jquery-and-jash/"&gt;Gareth Rushgrove&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bookmarklets"&gt;bookmarklets&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/firefox"&gt;firefox&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gareth-rushgrove"&gt;gareth-rushgrove&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/internet-explorer"&gt;internet-explorer&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jash"&gt;jash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/opera"&gt;opera&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/safari"&gt;safari&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/shell"&gt;shell&lt;/a&gt;&lt;/p&gt;



</summary><category term="bookmarklets"/><category term="firefox"/><category term="gareth-rushgrove"/><category term="internet-explorer"/><category term="jash"/><category term="javascript"/><category term="opera"/><category term="safari"/><category term="shell"/></entry></feed>