Skip to content
  • Mark Olesen's avatar
    3b96a557
    CONFIG: remove non-POSIX use of 'type' (issue #176) · 3b96a557
    Mark Olesen authored
    - In the foundation version they introduced a construct to handle
      the transition from 'wmRefresh' as an alias to 'wmRefresh' as
      a shell function. This transition is unnecessary for OpenFOAM+
      since 1606 used wmREFRESH (not wmRefresh) as an alias.
    
      For portability it is important to avoid this non-POSIX
      "type -t". It causes issues with dash and with zsh
      (mentioned in issue #277).
    
            type -t dash  ->   -t: not found
            type -t zsh   ->  zsh: bad option: -t
    
    Note: zsh users may still noticed other problems.
    For example, the POSIX 'unset -f' normally has no output, but in zsh
    it reports an error and has exit code 1 if the function was not
    previously defined. Whereas in POSIX (including bash, dash) it only
    returns non-zero if the name(s) could not be unset.
    3b96a557
    CONFIG: remove non-POSIX use of 'type' (issue #176)
    Mark Olesen authored
    - In the foundation version they introduced a construct to handle
      the transition from 'wmRefresh' as an alias to 'wmRefresh' as
      a shell function. This transition is unnecessary for OpenFOAM+
      since 1606 used wmREFRESH (not wmRefresh) as an alias.
    
      For portability it is important to avoid this non-POSIX
      "type -t". It causes issues with dash and with zsh
      (mentioned in issue #277).
    
            type -t dash  ->   -t: not found
            type -t zsh   ->  zsh: bad option: -t
    
    Note: zsh users may still noticed other problems.
    For example, the POSIX 'unset -f' normally has no output, but in zsh
    it reports an error and has exit code 1 if the function was not
    previously defined. Whereas in POSIX (including bash, dash) it only
    returns non-zero if the name(s) could not be unset.
Loading