Well, you could try a hack for OSX or other *nix. It is not elegant, and may cause other problems, but you could simply write a little script that monitors a directory for files matching your pattern and renames them to dot files. If you then run this script as a cronjob all matching files will be renamed to hidden ones. For example:
#!/bin/env bash
while true; do
find ~/ -name "*~" -o -name "\#*\#"| ## find files matching your pattern
while IFS= read -r n; do ## save each file as $n
d=`dirname $n`; ## $d is the directory $n was found in
b=`basename $n`; ## $b is the name of the file, no path
mv "$n" "$d/.$b"; ## rename it as a hidden file
sleep 1; ## wait one second
done;
done
If you save this as ~/renamedot.sh and make it executable (chmod a+x ~/renamedot.sh) You can then create a crontab (run cron -e) like this:
@reboot /Users/your_user/renamedot.sh &
Now, this script will be run as a daemon and automatically rename any files matching your pattern to hidden dot files.
WARNING: This is not a good idea. The programs that generate these files and might depend on them will no longer find them since they have been renamed. For example, emacs's M-X recover-this-file will no longer work because its backup will not be found. You could always point it to the renamed file manually of course, but it might not be so easy in other cases. So, use at your own risk.
;). I yet ask because I believe that the developers of these operating systems are smart enough not to have the patterns hard-coded, implying that they can be modified. – Sean Allred Apr 18 '13 at 23:03if (noglob_dot_filenames == 0 && pat[0] != '.' ... )– Bradd Szonye Apr 18 '13 at 23:47match-hidden-filesoption to readline: "This variable, when set to ‘on’, causes Readline to match files whose names begin with a ‘.’ (hidden files) when performing filename completion. If set to ‘off’, the leading ‘.’ must be supplied by the user in the filename to be completed." (Also note how the definition of a hidden file is written right into the docs!) – Bradd Szonye Apr 19 '13 at 20:23lsis configurable though: in your alias for ls put some combination of --hide='.~' (if you still want to see them with -a) or --ignore='#.'. Or you can use --color=auto and usedircolorsto set the LS_COLORS var to something that doesn't stand out (so you can still see them, but they won't catch your eye.) – Wandering Logic Apr 23 '13 at 12:37