Command for shenanigans
This commit is contained in:
parent
1a8c9d7c5a
commit
99e0927c00
2 changed files with 19 additions and 0 deletions
|
@ -23,3 +23,13 @@ else
|
|||
col=33;
|
||||
fi
|
||||
export PS1="\[\e]2;\u@\H \w\a\]\[\e[0;37m\][\[\e[0;${col}m\]\u\[\e[0;37m\]@\[\e[0;34m\]\h \[\e[0;36m\]\W\[\e[0;37m\]]\$\[\e[0m\] "
|
||||
|
||||
# Replace the content of a symlinked file
|
||||
# Useful for ad-hoc replacing of Nix config files
|
||||
subl() {
|
||||
[ -f "$1" ] || return 3
|
||||
[ -h "$1" ] || return 4
|
||||
src="$(readlink -f "$1")"
|
||||
rm "$1"
|
||||
cat "$src" > "$1"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue