Skip to content
Snippets Groups Projects

Resolve "There is nothing about ZSH"

Merged Norman Koch requested to merge issue-217 into preview
Compare and Show latest version
1 file
+ 28
20
Compare changes
  • Side-by-side
  • Inline
# ZSH
The ZSH, short for `z-shell`, is an alternative shell for Linux that offers many convienence features
!!! warning
Though all efforts have been made to ensure the accuracy and
currency of the content on this website, please be advised that
some content might be out of date and there is no continuous
website support available. In case of any ambiguity or doubts,
users are advised to do their own research on the content's
accuracy and currency.
The ZSH, short for `z-shell`, is an alternative shell for Linux that offers many convenience features
for productive use that `bash`, the default shell, does not offer.
This should be a short introduction to `zsh` and offer some examples that are especially useful on Taurus.
@@ -96,7 +104,7 @@ mcd () {
You can then
```
marie@login$ mcd non-existant-directory
marie@login$ mcd non-existent-directory
```
and it will create it and `cd` into it
@@ -105,20 +113,20 @@ and it will create it and `cd` into it
```bash
function treesizethis {
du -k --max-depth=1 | sort -nr | awk '
BEGIN {
split("KB,MB,GB,TB", Units, ",");
}
{
u = 1;
while ($1 >= 1024) {
$1 = $1 / 1024;
u += 1
}
$1 = sprintf("%.1f %s", $1, Units[u]);
print $0;
}
'
du -k --max-depth=1 | sort -nr | awk '
BEGIN {
split("KB,MB,GB,TB", Units, ",");
}
{
u = 1;
while ($1 >= 1024) {
$1 = $1 / 1024;
u += 1
}
$1 = sprintf("%.1f %s", $1, Units[u]);
print $0;
}
'
}
```
@@ -149,8 +157,8 @@ This allows auto-completion for `module load`:
function _module {
MODULE_COMMANDS=(
'-t:Show computer parsable output'
'load:Lload a Module'
'unload:Unload a Module'
'load:Load a module'
'unload:Unload a module'
'spider:Search for a module'
'avail:Show available modules'
'list:List loaded modules'
@@ -167,13 +175,13 @@ compdef _module "module"
### Slurm-specific shortcuts
#### Show slurm log path
#### Show Slurm log path
This allows you to run `slurmlogpath $SLURM_ID` and get the log-path directly in stdout:
```bash
function slurmlogpath {
scontrol show job $1 | grep StdOut | sed -e 's/^\s*StdOut=//'
scontrol show job $1 | grep StdOut | sed -e 's/^\s*StdOut=//'
}
```
Loading