Add mkshrc
This commit is contained in:
parent
444459e785
commit
abfcee1473
|
@ -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) % '
|
Loading…
Reference in New Issue