commit 1e74487cd8efd3aaec3d073aa7d75d4a0d6f3cda parent 6084bc4c97ecd1823249161c62912b8dc2573ba8 Author: hhvn <dev@hhvn.uk> Date: Sun, 2 Jan 2022 16:11:30 +0000 .rcrc: alias functions act normally if not interactive Diffstat:
M | .rcrc | | | 22 | +++++++++++++++++++--- |
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/.rcrc b/.rcrc @@ -88,8 +88,18 @@ fn prompt { # Aliases fn g { git $* } fn vsplit { vim -O } -if (~ `{uname} 'Linux') - fn ls { builtin ls --color $* } +if (~ `{uname} 'Linux') { + fn ls { + if (flag i) { + builtin ls -FC --color $* + } else { + # rc exports all functions, + # so we need to act normal + # when not interactive. + builtin ls $* + } + } +} fn v { nvim $* } fn xi { doas xbps-install $*} fn xr { doas xbps-remove $*} @@ -104,7 +114,13 @@ fn sloccount { fn camerasync { rsync -azP /mnt/DCIM/* ~/general/images/byme" } -fn wtf { builtin wtf -o } +fn wtf { + if (flag i) { + builtin wtf -o + } else { + builtin wtf + } +} # Settings if (! ~ $XDG_CONFIG_HOME ()) {