Add mkshrc

This commit is contained in:
Gender Demon 2022-07-26 18:53:44 +01:00
parent 444459e785
commit abfcee1473
1 changed files with 29 additions and 0 deletions

29
mkshrc Normal file
View File

@ -0,0 +1,29 @@
# Aliases
alias ls="ls --color=auto"
# Show all the things when using gcc
alias gcc="gcc -Wall"
# Keybinds
# ^L clears screen (by default only ^[^L)
bind ^L=clear-screen
# Prompt
# Prompt functions
get_username() {
print $(id -un)
}
get_hostname() {
print $(hostname)
}
get_cwd() {
# substitute $HOME string in $PWD with ~
# (so for example /home/cren/config becomes ~/config)
print ${PWD/$HOME/~}
}
# Prompt colour strings. To save typing them out every time I want to use them!
# TODO
PS1='$(get_username)@$(get_hostname) $(get_cwd) % '