Menu

#6 alias/function support

open
nobody
None
5
2012-10-26
2010-06-27
Anonymous
No

I suggest adding support for aliases / functions based on python. E.g., the user may have a pycmdrc file, which is a python file, that is loaded on startup. When the user writes 'foo arg1 arg2' in the command line, 'foo' is first searched from the functions loaded from pycmdrc, and if not found, executed as a process.

Discussion

  • Horea Haitonic

    Horea Haitonic - 2010-06-28

    Can you give me some examples where this is needed? Is there something that one cannot achieve by having a directory of useful python scripts and running:

    python.exe C:\tools\foo.py arg1 arg2

    ?

    This could be further refined using batch files to simplify the usage...

    Of course, in certain ways this is less convenient that what you suggested (no arguing that). What I am trying to say is that supporting such aliases/functions brings some relatively small gains for a big implementation price...

    Of course, this is just my opinion; I'm ready to discuss :)

     
  • Anonymous

    Anonymous - 2010-07-06

    essentially, i agree with you. but:
    1. maintaining a python file per 1-3 line function is annoying
    2. such commands cannot modify the environment

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.