zsh: Fix map function.
This commit is contained in:
parent
fe0fe21a12
commit
0d97bc51a2
1 changed files with 3 additions and 1 deletions
|
@ -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'";
|
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";
|
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 }
|
||||||
|
@ -23,8 +24,9 @@ mkIf (elem "zsh" config.machine.conffiles) {
|
||||||
function rwhich() { realpath $(which $@) }
|
function rwhich() { realpath $(which $@) }
|
||||||
function cdf() { cd $(rwhich $@ | sed "s/$@$//") }
|
function cdf() { cd $(rwhich $@ | sed "s/$@$//") }
|
||||||
function sfu() { lsunits | rg -i $@ }
|
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 = {
|
ohMyZsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [ "cabal" "docker" "gitfast" "python" "pip" "sudo" "systemd" "man" ];
|
plugins = [ "cabal" "docker" "gitfast" "python" "pip" "sudo" "systemd" "man" ];
|
||||||
|
|
Loading…
Reference in a new issue