Why does .lesshst keep showing up in my ~
FIlenames starting with . are (lightly) hidden files. They're often use by programs to record configuration or usage information. Sometimes that's recorded from the last time you used the program; that's the case with less
and the .lesshist
"history" file.
If you aren't sure which program created the file, a websearch will usually answer the question... so I'm leaving understanding the rest of those files as an Exercise For The Reader.
You can disable the creation of the ~/.lesshst
file by setting the LESSHISTFILE
variable to -
.
export LESSHISTFILE=-
You can also set the above to another valid file path to have the less
command use that file instead. I like to do the following in my ~/.xprofile
file:
export LESSHISTFILE="$XDG_STATE_HOME"/less/history
As for your git
stuff, Git
probably wasn't the program that created the ~/.config
folder. That folder is part of the XDG Base Dirs specification, and git
actually respects this specification. In short all you need to do is:
mv -T ~/.gitconfig $XDG_CONFIG_HOME/git/config
mv -T ~/.gitignore_global $XDG_CONFIG_HOME/git/ignore
Also see Arch Wiki for XDG Base Directory