diff --git a/mkshrc b/mkshrc new file mode 100644 index 0000000..accd59b --- /dev/null +++ b/mkshrc @@ -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) % '