2017-08-21 07:13 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002571OpenFOAM[All Projects] Bugpublic2017-06-26 13:04
Reportertomc 
Assigned Tochris 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Versiondev 
Target VersionFixed in Version 
Summary0002571: in foam-dev (20170605) using [TAB] in foamMonitor creates a syntax error on folder name ".../residuals(p,k)"
Descriptionexample of folder location:
/postProcessing/residuals(p,k)/0/residuals.dat

when using the command ls and finish typing with [TAB] I can make automatically;
ls postProcessing/residuals\(p\,k\)/0/residuals.dat

when using the same typing in the command foamMonitor -l, I have;
foamMonitor -l postProcessing/residuals(p,k)
and later the [TAB] can't finish anymore due to the syntax error on "residuals(p,k)".
Steps To Reproducesee above

It is only reproducible in the latest version of foam-dev
TagsNo tags attached.
Attached Files
  • patch file icon proposition_v1.patch (30 bytes) 2017-06-25 15:43 -
    etc/config.sh/bash_completion
    
    patch file icon proposition_v1.patch (30 bytes) 2017-06-25 15:43 +
  • patch file icon proposition_v1-2.patch (421 bytes) 2017-06-25 15:44 -
    diff --git a/etc/config.sh/bash_completion b/etc/config.sh/bash_completion
    index d52281e..af7d01b 100644
    --- a/etc/config.sh/bash_completion
    +++ b/etc/config.sh/bash_completion
    @@ -5792,7 +5792,7 @@ _foamMonitor_ ()
         esac
         COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
     }
    -complete -o nospace -F _foamMonitor_ foamMonitor
    +complete -o filenames -o nospace -F _foamMonitor_ foamMonitor
     
     _foamNew_ ()
     {
    
    patch file icon proposition_v1-2.patch (421 bytes) 2017-06-25 15:44 +
  • gz file icon proposition_v1.tar.gz (9,598 bytes) 2017-06-25 15:45

-Relationships
+Relationships

-Notes

~0008248

wyldckat (updater)

@chris: Attached are the following files for fixing this issue:

 - proposition_v1-2.patch - this is the patch file for easier inspection of the change. Essentially the option "-o filenames" will solve this issue in a portable way.

 - proposition_v1.tar.gz - this file provides a replacement file for "etc/config.sh/bash_completion" with this fix.


We could use the function "_filedir" to handle the filtering, but it's not portable to all Linux Distributions, e.g. CentOS 6.

I did not add this option to other entries either, because I couldn't spot any other utilities/scripts that could make good use of this option.



By the way, the report #2590 - https://bugs.openfoam.org/view.php?id=2590 - also somewhat affects the file "etc/config.sh/bash_completion", i.e. "_foamDebugSwitches_" should be removed from this file.

~0008260

chris (manager)

"-o filenames" works well for foamCloneCase. I don't think it causes problems with other commands, so we could also include it by default. Is that OK @wyldckat @tomc ?

~0008263

wyldckat (updater)

@chris: I guess it's worth a try.

The only thing that comes to mind is for the cases that time folders with negative time values, such as the ones that use "engineFoam", where the auto-complete might switch to '\-180' automatically for whatever reason... but I haven't tested that hypothesis yet.

~0008264

chris (manager)

Resolved by commit https://github.com/OpenFOAM/OpenFOAM-dev/commit/4cb47940e0501883310a056e22b1e0428a61ea9b
+Notes

-Issue History
Date Modified Username Field Change
2017-06-06 10:43 tomc New Issue
2017-06-25 15:43 wyldckat File Added: proposition_v1.patch
2017-06-25 15:44 wyldckat File Added: proposition_v1-2.patch
2017-06-25 15:45 wyldckat File Added: proposition_v1.tar.gz
2017-06-25 15:45 wyldckat Assigned To => chris
2017-06-25 15:45 wyldckat Status new => assigned
2017-06-25 15:50 wyldckat Note Added: 0008248
2017-06-26 11:04 administrator Note Added: 0008258
2017-06-26 11:50 administrator Note Deleted: 0008258
2017-06-26 11:51 chris Note Added: 0008260
2017-06-26 12:18 wyldckat Note Added: 0008263
2017-06-26 13:04 chris Status assigned => closed
2017-06-26 13:04 chris Resolution open => fixed
2017-06-26 13:04 chris Note Added: 0008264
+Issue History