ls | grep -v '~$' is the quick solution. It uses ls to list all (non-hidden) files, then uses grep with
-v (inverted matching, i.e., exclusion) to exclude all lines with the tilde (
~) at the end (
HOWEVER, if you have ANY files named like something1, something2, it's a HUGE smelly indicator that you have a bad workflow, which you should fix at the source, not with clunky hacks like modifying how ls works.
If you find yourself naming files with version numbers, like test1 and test2 or testone and testtwo, then what you really want is a version control system, like
This is especially true in your case, where you have multiple versions of multiple files, and the versioning seems to need to be coordinated between all of the files.
Version control systems let you essentially overlay a time window onto the filesystem, so you only see the one
test file, but under the hood (through the version control program) all versions are available to search through, retrieve, revert to, compare with, etc.
Once you have this set up, you no longer need backup files from your editor, because version control has the history of the files since you started using it, even if you've made a thousand changes since then. You can even "branch" the history timeline, trying out a new idea, and going back in time and then forward to try a different idea, if you need to.