Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/85d2d5d34a0ac029c14126661103613739c61db4
>---------------------------------------------------------------
commit 85d2d5d34a0ac029c14126661103613739c61db4
Author: Mihai Nita <
nmiha...@yahoo.com>
Date: Sun Aug 31 19:43:00 2025 -0700
Optionally hide files and folders starting with dot (#995)
>---------------------------------------------------------------
85d2d5d34a0ac029c14126661103613739c61db4
far/FarCze.hlf.m4 | 15 +++++++++++++++
far/FarEng.hlf.m4 | 15 +++++++++++++++
far/FarGer.hlf.m4 | 15 +++++++++++++++
far/FarHun.hlf.m4 | 15 +++++++++++++++
far/FarPol.hlf.m4 | 15 +++++++++++++++
far/FarRus.hlf.m4 | 15 +++++++++++++++
far/FarSky.hlf.m4 | 15 +++++++++++++++
far/FarUkr.hlf.m4 | 15 +++++++++++++++
far/changelog | 5 +++++
far/config.cpp | 1 +
far/config.hpp | 1 +
far/farlang.templ.m4 | 2 +-
far/filelist.cpp | 15 +++++++++++++--
far/vbuild.m4 | 2 +-
14 files changed, 142 insertions(+), 4 deletions(-)
diff --git a/far/FarCze.hlf.m4 b/far/FarCze.hlf.m4
index f6e137a3d..75f38adbe 100644
--- a/far/FarCze.hlf.m4
+++ b/far/FarCze.hlf.m4
@@ -6907,6 +6907,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Index help file#
<%INDEX%>
diff --git a/far/FarEng.hlf.m4 b/far/FarEng.hlf.m4
index 61c829cf8..12948be44 100644
--- a/far/FarEng.hlf.m4
+++ b/far/FarEng.hlf.m4
@@ -6874,6 +6874,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Index help file#
<%INDEX%>
diff --git a/far/FarGer.hlf.m4 b/far/FarGer.hlf.m4
index 261c2d3fe..5b7730d70 100644
--- a/far/FarGer.hlf.m4
+++ b/far/FarGer.hlf.m4
@@ -6965,6 +6965,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Index help file#
<%INDEX%>
diff --git a/far/FarHun.hlf.m4 b/far/FarHun.hlf.m4
index ed80ce732..a3e8ebab9 100644
--- a/far/FarHun.hlf.m4
+++ b/far/FarHun.hlf.m4
@@ -6985,6 +6985,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #A súgó betűrendes tartalomjegyzéke#
<%INDEX%>
diff --git a/far/FarPol.hlf.m4 b/far/FarPol.hlf.m4
index 8a2ec3923..d46ee9ea9 100644
--- a/far/FarPol.hlf.m4
+++ b/far/FarPol.hlf.m4
@@ -6888,6 +6888,21 @@ tworzenia, usuwania lub zmiany nazw folderów.
Ten parametr można zmienić tylko w ~far:config~@FarConfig@.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Indeks pliku pomocy#
<%INDEX%>
diff --git a/far/FarRus.hlf.m4 b/far/FarRus.hlf.m4
index 9b1cdfbbd..40756e879 100644
--- a/far/FarRus.hlf.m4
+++ b/far/FarRus.hlf.m4
@@ -6997,6 +6997,21 @@ $ #far:config Panel.Tree.TurnOffCompletely#
Изменить этот параметр можно только через ~far:config~@FarConfig@.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Индекс файла помощи#
<%INDEX%>
diff --git a/far/FarSky.hlf.m4 b/far/FarSky.hlf.m4
index 739919881..f7ec696ae 100644
--- a/far/FarSky.hlf.m4
+++ b/far/FarSky.hlf.m4
@@ -6868,6 +6868,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Index help file#
<%INDEX%>
diff --git a/far/FarUkr.hlf.m4 b/far/FarUkr.hlf.m4
index 4bf957676..692f93129 100644
--- a/far/FarUkr.hlf.m4
+++ b/far/FarUkr.hlf.m4
@@ -6956,6 +6956,21 @@ deleted, or renamed.
This parameter can be changed via ~far:config~@FarConfig@ only.
+...@Panel.TreatDotFilesAsHidden
+$ #far:config Panel.TreatDotFilesAsHidden#
+ This Boolean parameter controls the filtering of files or folders
+starting with a dot (“dotfiles”). It works in combination with the
+#Show hidden and system files# option in the
+~panel settings~@PanelSettings@ dialog.
+
+ False - ^<wrap>Dotfiles will always be shown.
+ True - Dotfiles will be hidden/shown together with the Hidden and System files.
+
+ Default value: False (Dotfiles will always be shown.)
+
+ This parameter can be changed via ~far:config~@FarConfig@ only.
+
+
@Index
$ #Index help file#
<%INDEX%>
diff --git a/far/changelog b/far/changelog
index 8e6bcab1f..8090753fc 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+mihnita 2025-08-31 19:43:00-07:00 - build 6543
+
+1. Optionally hide files and folders starting with dot.
+
--------------------------------------------------------------------------------
drkns 2025-08-31 18:02:48+01:00 - build 6542
diff --git a/far/config.cpp b/far/config.cpp
index 6dc03c865..b193a473f 100644
--- a/far/config.cpp
+++ b/far/config.cpp
@@ -1983,6 +1983,7 @@ void Options::InitConfigsData()
{FSSF_PRIVATE, NKeyPanel, L"ShellRightLeftArrowsRule"sv, ShellRightLeftArrowsRule, false},
{FSSF_PANEL, NKeyPanel, L"ShowBytes"sv, ShowBytes, false},
{FSSF_PANEL, NKeyPanel, L"ShowHidden"sv, ShowHidden, true},
+ {FSSF_PANEL, NKeyPanel, L"TreatDotFilesAsHidden"sv, TreatDotFilesAsHidden, false},
{FSSF_PANEL, NKeyPanel, L"ShortcutAlwaysChdir"sv, ShortcutAlwaysChdir, false},
{FSSF_PRIVATE, NKeyPanel, L"SortFolderExt"sv, SortFolderExt, false},
{FSSF_PRIVATE, NKeyPanel, L"RightClickSelect"sv, RightClickSelect, false},
diff --git a/far/config.hpp b/far/config.hpp
index 4d3652a7c..5a763d24a 100644
--- a/far/config.hpp
+++ b/far/config.hpp
@@ -815,6 +815,7 @@ public:
BoolOption ScreenSaver;
IntOption ScreenSaverTime;
BoolOption ShowHidden;
+ BoolOption TreatDotFilesAsHidden;
BoolOption ShortcutAlwaysChdir;
BoolOption Highlight;
BoolOption RightClickSelect;
diff --git a/far/farlang.templ.m4 b/far/farlang.templ.m4
index bd4792f76..2b9612442 100644
--- a/far/farlang.templ.m4
+++ b/far/farlang.templ.m4
@@ -1,4 +1,4 @@
-#
+#
# Note:
https://learn.microsoft.com/en-us/globalization/reference/microsoft-language-resources is a good source of system- and UI-specific translations.
#
diff --git a/far/filelist.cpp b/far/filelist.cpp
index 5fadf3ab7..5f8d990b4 100644
--- a/far/filelist.cpp
+++ b/far/filelist.cpp
@@ -6882,6 +6882,17 @@ void FileList::UpdateIfRequired()
Update((m_KeepSelection? UPDATE_KEEP_SELECTION : 0) | UPDATE_IGNORE_VISIBLE);
}
+static bool ShouldHideFilesFromView(DWORD Attributes, const string &FileName)
+{
+ if (Global->Opt->ShowHidden)
+ return false;
+ if (Attributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
+ return true;
+ if (!Global->Opt->TreatDotFilesAsHidden)
+ return false;
+ return FileName.starts_with(L'.');
+}
+
void FileList::ReadFileNames(bool const KeepSelection, bool const UpdateEvenIfPanelInvisible)
{
const auto DataLock = lock_data();
@@ -7069,7 +7080,7 @@ void FileList::ReadFileNames(bool const KeepSelection, bool const UpdateEvenIfPa
const auto IsDirectory = os::fs::is_directory(fdata);
- if (fdata.Attributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM) && !Global->Opt->ShowHidden)
+ if (ShouldHideFilesFromView(fdata.Attributes, fdata.FileName))
continue;
if (UseFilter && !m_Filter->FileInFilter(fdata, fdata.FileName))
@@ -7577,7 +7588,7 @@ void FileList::UpdatePlugin(bool const KeepSelection, bool const UpdateEvenIfPan
}
}
- if (!Global->Opt->ShowHidden && (PanelItem.FileAttributes & (FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM)))
+ if (ShouldHideFilesFromView(PanelItem.FileAttributes, PanelItem.FileName))
continue;
FileListItem NewItem(PanelItem);
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 3152e4729..aff74eed6 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6542
+6543