1
0
Fork 0

zsh: Fix map function.

This commit is contained in:
Kevin Baensch 2021-11-24 22:47:40 +01:00
parent fe0fe21a12
commit 0d97bc51a2
Signed by: derped
GPG Key ID: C0F1D326C7626543
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ mkIf (elem "zsh" config.machine.conffiles) {
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 = ''
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 }
@ -23,8 +24,9 @@ mkIf (elem "zsh" config.machine.conffiles) {
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 }
function map() { for f in "$\{@:2\}"; do; eval $1 \"$f\"; done }
'';
ohMyZsh = {
enable = true;
plugins = [ "cabal" "docker" "gitfast" "python" "pip" "sudo" "systemd" "man" ];