mirror of https://git.decapod.one/brethil/dotfiles
Compare commits
2 Commits
fc0410eff3
...
fbc6934f8f
Author | SHA1 | Date |
---|---|---|
bretello | fbc6934f8f | |
bretello | 4b73ed209f |
|
@ -0,0 +1,12 @@
|
|||
# open vim with a scratch window that can be discarded on exit.
|
||||
vimscratch() {
|
||||
local args
|
||||
# if running in a pipe, use stdin (-) as arg.
|
||||
# -t checks if the given FD is a terminal
|
||||
if [ -t 0 ] ; then
|
||||
args="$@"
|
||||
else
|
||||
args="-"
|
||||
fi
|
||||
vim -c "set buftype=nofile" "$args"
|
||||
}
|
|
@ -41,7 +41,7 @@ function job_prompt() {
|
|||
|
||||
function shlvl_prompt() {
|
||||
local SHLVL_PROMPT
|
||||
if [[ -n "$BYOBU_PREFIX" ]]; then
|
||||
if [[ -n "$TMUX" ]]; then
|
||||
SHLVL_PROMPT="%(3L.%K{161}%F{255}%B $((SHLVL-1)) %f%b%k.)" # Shows SHLVL on a magenta background if SHLVL > 1
|
||||
else
|
||||
SHLVL_PROMPT="%(2L.%K{161}%F{255}%B %L %f%b%k.)" # Shows SHLVL on a magenta background if SHLVL > 1
|
||||
|
|
Loading…
Reference in New Issue