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
+ 20
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
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.
@@ -46,7 +46,7 @@ plugins+=(
### Typo-correction
With
With
```bash
setopt correct_all
@@ -105,20 +105,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;
}
'
}
```
@@ -126,7 +126,7 @@ This lists all files, from largest to smallest, in the current directory.
### Automatically rewrite `..` as `../..`
This will automatically replace `...` with `../..` and `....` with `../../..` and so on (each additional `.`
This will automatically replace `...` with `../..` and `....` with `../../..` and so on (each additional `.`
adding another `/..`) when typing commands:
``` bash
@@ -150,7 +150,7 @@ function _module {
MODULE_COMMANDS=(
'-t:Show computer parsable output'
'load:Lload a Module'
'unload:Unload a Module'
'unload:Unload a module'
'spider:Search for a module'
'avail:Show available modules'
'list:List loaded modules'
@@ -167,13 +167,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