Skip to main content

Managing shell scripts with org-mode

I found out that org mode is a good place for managing your small shell scripts due to its tangling capabilities.

It lets you keep all of your scripts in one file and not being overwhelemed with multiple small files. You simply write code for the scripts in source block and set :tangle and :shebang or :tangle-mode header arguments. Simple example:

* Org header to keep some structure to your scripts
You can use the full power of org-mode to describe your scripts.
So go wild adding links, using formatting etc.
#+begin_src bash :tangle "~/.local/bin/peek" :shebang "#!/bin/bash"’
ls -d */ | fzf --height=40% --preview 'tree -C {} | head -200' 
#+end_src