30 lines
565 B
Plaintext
30 lines
565 B
Plaintext
# 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) % '
|