LINUX LITE 7.4 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terminal customisations (prompt, avoiding ./ and aliasing cd ..)
#1
I'd read in several places that you're not supposed to edit ~/.bashrc but when I edited ~/.profile none of the changes worked, so using .bashrc for now until someone can explain why.

Here's some lines I appended to .bashrc after 1 day using LinuxLite:

Code:
# set command prompt to Windows DOS style
PS1='$(pwd)>'

Because I don't need to know the user or the host as these will never change. Don't need to know if Terminal is opened with root access as that is obvious to the person who opened the Terminal (who is only me). Also, I don't want to see ~ as the abbreviation for the home directory as this hides information I want to know.

Code:
# set PATH so that user can avoid typing ./ before running executables
PATH=.:$PATH

Because I expect the computer to understand that when the directory isn't explicitly specified then it should default to the current working directory. That to me is just common sense.

Code:
# use / as Amiga style cd .. command. alias doesn't allow / so use function
function / { cd '..'; }

I'm so used to typing / to go to the parent directory that it's ingrained in muscle memory even after decades of not doing this. It's a minor hassle to force myself to type cd .. which seems so clunky by comparison. When I tried to set this using alias it kept throwing an error, so resorted to using function.
Reply


Messages In This Thread
Terminal customisations (prompt, avoiding ./ and aliasing cd ..) - by alowe - 03-29-2018, 02:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)