Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: fortran completion



On Nov 2,  9:37am, Anonymous bin ich wrote:
}
} I have a program which needs to do autocompletion for fortran
} source code files. Right now I have this line in my .zshrc
} 
} compdef '_files -g "*.f*"' f90.sh
} 
} but I would like to have something more robust/official.
} 
} I see that for gfortran, autocompletion works, but I cannot seem to
} find relevant function. (neither _gfortran nor _fortran is available)

Right, there is no fortran-specific completion function,  I don't even
have the fortran compilers installed on any machine I work with, and I
suspect very few people on the zsh lists use fortran, so no one has been
motivated to create a completer for it.

If you can cause "f90.sh" to recognize a "--help" option and pass it
through to gfortran, you may be able to get away with

    compdef _gnu_generic gfortran f90.sh

The _gnu_generic completer tells completion to attempt to create a
completion by running the command with the --help option and parsing
the output.



Messages sorted by: Reverse Date, Date, Thread, Author