From d1c077220756fe30adb70b422d34dab7ef24a0d0 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 25 Oct 2024 17:42:17 +0530 Subject: [PATCH] fish: conf.d/cabal.abbr: Improve cabal build & add exec The cabal exec command is sometimes helpful to debug why HLS is not working. If that command complains HLS refuses to work. --- fish/.config/fish/conf.d/cabal-abbr.fish | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fish/.config/fish/conf.d/cabal-abbr.fish b/fish/.config/fish/conf.d/cabal-abbr.fish index 3d64c6d..6e997a2 100644 --- a/fish/.config/fish/conf.d/cabal-abbr.fish +++ b/fish/.config/fish/conf.d/cabal-abbr.fish @@ -1,11 +1,12 @@ abbr cbench 'cabal bench --enable-benchmarks' -abbr cbuild 'cabal build --write-ghc-environment-files=always' -abbr cbuildn 'cabal build --write-ghc-environment-files=always --allow-newer' +abbr cbuild 'cabal build --jobs=(math --scale=0 (nproc) / 2) --write-ghc-environment-files=always' +abbr cbuildn 'cabal build --jobs=(math --scale=0 (nproc) / 2) --write-ghc-environment-files=always --allow-newer' abbr cconf 'cabal configure' abbr cwipe 'cabal clean' abbr cclean 'cabal-clean' abbr cdel 'cabal-clean --delete' abbr crem 'cabal-clean --remove' +abbr cexec 'cabal exec -v0 -- ghc --print-libdir' abbr cdoc 'cabal haddock --enable-documentation' abbr cinstall 'cabal install --installdir=$HOME/.local/bin --overwrite-policy=always --install-method=copy' abbr crun 'cabal run'