diff --git a/fish/.config/fish/conf.d/cabal-abbr.fish b/fish/.config/fish/conf.d/cabal-abbr.fish index 6dc681e..5f0b991 100644 --- a/fish/.config/fish/conf.d/cabal-abbr.fish +++ b/fish/.config/fish/conf.d/cabal-abbr.fish @@ -37,5 +37,3 @@ abbr cpD 'cabal-plan dot' abbr cpdp 'cabal-plan dot-png' abbr cpt 'cabal-plan topo' abbr cplr 'cabal-plan license-reportate' -abbr chi 'hiedb -D .hiedb index .hiefiles --src-base-dir .' -abbr chic 'find . -name .hiefiles | awk \'{print $1" "substr($1, 1, length($1) - length(".hiefiles"))}\' | xargs -n2 sh -c \'hiedb -D .hiedb index $0 --src-base-dir=$1 --skip-types\'' diff --git a/fish/.config/fish/functions/hclean.fish b/fish/.config/fish/functions/hclean.fish new file mode 100644 index 0000000..60a0c28 --- /dev/null +++ b/fish/.config/fish/functions/hclean.fish @@ -0,0 +1,3 @@ +function hclean --description "Clean all Haskell build artefacts" + find . -name .hiedb -type f -delete && find . -name .hiefiles -type d -exec rm -rf {} + && find . -name dist-newstyle -type d -exec rm -rf {} + && find . -name tags -type f -delete && find . -name ".ghc.environment*" -type f -delete +end diff --git a/fish/.config/fish/functions/hieg.fish b/fish/.config/fish/functions/hieg.fish new file mode 100644 index 0000000..07f4255 --- /dev/null +++ b/fish/.config/fish/functions/hieg.fish @@ -0,0 +1,3 @@ +function hieg --description "Generate HieDb" + hiedb -D .hiedb index .hiefiles --src-base-dir . +end diff --git a/fish/.config/fish/functions/hier.fish b/fish/.config/fish/functions/hier.fish new file mode 100644 index 0000000..356a442 --- /dev/null +++ b/fish/.config/fish/functions/hier.fish @@ -0,0 +1,3 @@ +function hier --description "Generate HieDb for multi-project workspace" + find . -name .hiefiles | awk '{print $1" "substr($1, 1, length($1) - length(".hiefiles"))}' | xargs -n2 sh -c 'hiedb -D .hiedb index $0 --src-base-dir=$1 --skip-types' +end