83 private links
Burgeoning linter for zsh scripts. Akin to shellcheck but specific to zsh. Developed by a trustworthy individual, so even if early days is probably fruitful to keep an eye on.
Seeing where environment variables get set, logging every execution of zsh/bash into a file. Really clever use of fd and shows how easy it is with zsh.
A detailed run-down of the differences between [ condition ] and [[ condition ]] in bash programming.
Benchmarking the time zsh takes to start up (though I believe it is more accurate with my own benchmark script for the simple absolute time output).
What is really useful however is the percentage, i.e. relative time output of individual function calls by zsh itself.
What it boils down to is putting zmodload zsh/zprof
on top of your startup (e.g. .zshrc
) and zprof
at the very end.
When creating a new shell this will nicely output whatever happens in between.
In ZSH you can increase your productivity with aliases. This post explains 5 types of aliases that you should know. Boost your shell productivity now and make ZSH your own
The zsh shell offers countless options and features. Here are 5 ways to boost your efficiency from the command line.
Advanced aliases are interesting (e.g. aliases based on file ending)
:0 should do the trick. From the zsh documentation:
Word Designators
A word designator indicates which word or words of a given command line
are to be included in a history reference. A :' usually separates the event specification from the word designator. It may be omitted only if the word designator begins with a
^', $',
*', -' or
%'. Word
designators include:
0 The first input word (command).
n The nth argument.
^ The first argument. That is, 1.
$ The last argument.
% The word matched by (the most recent) ?str search.
x-y A range of words; x defaults to 0.
* All the arguments, or a null value if there are none.
x* Abbreviates `x-$'.
x- Like `x*' but omitting word $.
another explanation: https://unix.stackexchange.com/questions/318955/how-to-repeat-currently-typed-in-parameter-in-zsh
In bash, using vi mode, if I hit Esc,v, my current command line is opened in the editor specified by $EDITOR and I am able to edit it in full screen before 'saving' the command to be returned to the