zsh: Add aliases and functions for stuff I regularly type.
This commit is contained in:
parent
8cf00bed0b
commit
f77aedf9a5
1 changed files with 8 additions and 1 deletions
|
@ -13,10 +13,17 @@ mkIf (elem "zsh" config.machine.conffiles) {
|
||||||
ls = "exa";
|
ls = "exa";
|
||||||
l = "exa -abgHhl@ --git --color=always --group-directories-first";
|
l = "exa -abgHhl@ --git --color=always --group-directories-first";
|
||||||
tree = "exa --tree --color=always";
|
tree = "exa --tree --color=always";
|
||||||
|
ustrip = "sed -e '/\.service\|\.timer\|\.target\|\.socket\|\.slice\|\.scope\|\.path\|\.mount\|\.device)/!d' -e 's/loaded.*$//g' -e 's/^ \|^● //g'";
|
||||||
|
lsunits = "systemctl list-units | ustrip";
|
||||||
};
|
};
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
function ll() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" }
|
function ll() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" }
|
||||||
function lln() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" -n}
|
function lln() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" -n }
|
||||||
|
function lszip() { unzip -l $@ 2>&1 | sed -e "1,3d" -e "s/^.*:.. *//g" | head --lines=-2 }
|
||||||
|
function rwhich() { realpath $(which $@) }
|
||||||
|
function cdf() { cd $(rwhich $@ | sed "s/$@$//") }
|
||||||
|
function sfu() { lsunits | rg -i $@ }
|
||||||
|
function map() { for f in "$\{@:2\}"; do; eval $1 $f; done }
|
||||||
'';
|
'';
|
||||||
ohMyZsh = {
|
ohMyZsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue