Skip to content

IFS shortcuts can now have a filename pattern - #3573

Open
andreas-prouza wants to merge 3 commits into
codefori:masterfrom
andreas-prouza:feature/ifs-shortcut-pattern
Open

andreas-prouza wants to merge 3 commits into
codefori:masterfrom
andreas-prouza:feature/ifs-shortcut-pattern

Conversation

@andreas-prouza

Copy link
Copy Markdown

Changes

IFS shortcuts can now have a filename pattern, so a shortcut can show only the files you care about (e.g. only *.rpgle, *.sqlrpgle in a source directory).

  • New Set Filename Pattern... action in the context menu of an IFS shortcut.
  • Patterns are comma-separated and case-insensitive: * matches any characters, ? matches a single character; a name without wildcards matches exactly. An empty pattern (or *) shows all files.
  • The pattern applies to streamfiles under the shortcut, including in subdirectories. Directories are always shown so the tree stays navigable.
  • The pattern is displayed as the shortcut's description and tooltip, and stays visible after sorting.
  • It only filters what is displayed: the stored file list is still complete.

Storage / compatibility: ifsShortcuts stays a string[], so extensions using the API are not affected. Patterns are stored in a new optional connection setting, ifsShortcutPatterns ({ [shortcutPath]: pattern }). The trade-off is one pattern per directory.

Patterns are removed with their shortcut (when removing the shortcut or deleting the directory). They are copied together with IFS shortcuts when profiles are assigned/cloned and when a connection is copied, and shown in a new column of the profile editor.

The matcher is parseFileNamePattern() in src/api/Filter.ts.

Bevore change:

image

After change:

I added t* as file pattern
image

How to test this PR

  1. Connect to a system and open the IFS Browser.
  2. Right-click a shortcut to a directory containing different file types and run Set Filename Pattern....
  3. Enter *.rpgle, *.sqlrpgle: the pattern shows next to the shortcut and only matching files are listed, also inside subdirectories.
  4. Sort the shortcut by name/date: the pattern stays visible next to the sort indicator.
  5. Run Set Filename Pattern... again and clear the input: all files are shown again.
  6. Set a pattern, remove the shortcut, add it again: it no longer has a pattern.
  7. Run the Filter Tests suite (new Filename pattern test case).

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

@buzzia2001
buzzia2001 self-requested a review December 6, 2026 10:01
@buzzia2001 buzzia2001 assigned buzzia2001 and unassigned buzzia2001 Dec 6, 2026
@buzzia2001 buzzia2001 added the enhancement New feature or request label Dec 6, 2026
@andreas-prouza
andreas-prouza deployed to testing_environment December 6, 2026 10:02 — with GitHub Actions Active
@buzzia2001

Copy link
Copy Markdown
Member

Hi @andreas-prouza, I really like this feature especially when you have tons of ifs files in a directory.

@sebjulliand @SanjulaGanepola The only thing I've been thinking about is whether it makes sense to keep the two-step process as it is now, or to rethink filters and shortcuts in IFS just as we did for the object browser...

This branch was successfully deployed

1 active deployment
testing_environment — 00c740e2 Deployed Dec 6, 2026 by andreas-prouza via Test runner #823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants