Menu

#84 CygwinBashConsole plugin

open
nobody
None
5
2008-06-12
2008-06-12
Alan Ezust
No

I'd like to see a Cygwin bash console plugin.
so I can use bash in windows in Console.
With forward slashes, and completion.
and then we can add aliases to make the drive letters go to /cygdrive/c/<default dir of that drive> like the Console System shell does.

I might just do this myself if nobody else takes it.

Discussion

  • Kazutoshi Satoda

    Logged In: YES
    user_id=1483238
    Originator: NO

    Just a comment...

    I have thought something like this for several times too.

    I sometimes run "bash -i" in current Console plugin to use some feature
    like pipe, command expansion, flexible quotes, ... But completions
    don't work. I think passing TAB key to the running process might enable
    completions.

    I think supporting "user specified shell program" will be better and
    more general feature. "bash -i" will work on linux too. Someone might
    prefer cmd.exe. etc.

     
  • Alan Ezust

    Alan Ezust - 2008-06-25

    Logged In: YES
    user_id=935841
    Originator: YES

    Yes, completions are tricky, especially since the path separator is being used to determine which platform console is runnning on, in many different places, in order to do special case escaping rules which are not really appropriate when running anything but the cmd shell.

    In addition, there needs to be some path translation between the C:\ and the /cygdrive/c/ format, in order for the vfsnodeselected ebmessages to be handled properly in the cygwin bash shell.

    So I see this as really a separate plugin that offers a shell extension for Console. I was going to modify the Console to have a special check to see if it was running bash in windows, and then disable some of backslash handling, but it was too much of a mess and I was afraid of breaking existing code.

    But anyway, I find that changing the "console shell prefix" to another shell that uses a different path separator from what Java thinks it should be, is just plain not going to work. Perhaps the cygwin bash shell can be used for other forward-slash shells on the windows platform. And on any other operating system, you won't ever need this plugin.

     
  • Alan Ezust

    Alan Ezust - 2008-06-25

    Logged In: YES
    user_id=935841
    Originator: YES

    With regards to passing the TAB to running sub-processes, I can certainly enable that in the regular Console.
    But I am pretty sure that will not be sufficient to make completion from subprocesses work, since you probably also need a terminal capability, and the terminal capability of console is quite limited.

     
  • daniel hahler

    daniel hahler - 2009-03-13

    I have just submitted a feature request for the Console plugin to add support for using cygpath for %f and %d substitution (https://sourceforge.net/tracker/index.php?func=detail&aid=2686110&group_id=588&atid=997936).

    I'm using "bash -c" as the system shell.

    I could imagine that "detecting cygwin and handling it in a special way" could work with the original plugin already.

    Please feel free to merge/duplicate the other feature request into this one (or the other way round). Thanks.

     

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.