mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-14 09:34:22 +08:00
Merge pull request #2541 from puffnfresh/cabal-sandboxes-info
Add cabal_sandbox_info function
This commit is contained in:
commit
500cbbc79b
1 file changed
+11
@@ -1,3 +1,14 @@
|
|||||||
|
function cabal_sandbox_info() {
|
||||||
|
cabal_files=(*.cabal(N))
|
||||||
|
if [ $#cabal_files -gt 0 ]; then
|
||||||
|
if [ -f cabal.sandbox.config ]; then
|
||||||
|
echo "%{$fg[green]%}sandboxed%{$reset_color%}"
|
||||||
|
else
|
||||||
|
echo "%{$fg[red]%}not sandboxed%{$reset_color%}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function _cabal_commands() {
|
function _cabal_commands() {
|
||||||
local ret=1 state
|
local ret=1 state
|
||||||
_arguments ':subcommand:->subcommand' && ret=0
|
_arguments ':subcommand:->subcommand' && ret=0
|
||||||
|
|||||||
Reference in new issue
Block a user