Skip to content
Snippets Groups Projects
Commit f23c3ab3 authored by nimrod's avatar nimrod
Browse files

Default value for set_title.

Use the basename for the current directory as the default title.
parent 7ab6ad7e
Branches
No related tags found
No related merge requests found
Pipeline #809 passed
......@@ -136,7 +136,6 @@ alias restart-kodi='ssh kodi.shore.co.il "sudo systemctl kill --kill-who=all --s
# shellcheck disable=SC2032
alias rm='rm --dir'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias set_title='printf "\033]0;%s\007"'
alias smtp-server='python3 -m smtpd -ndc DebuggingServer'
alias sudo="sudo "
alias sudome="sudome "
......@@ -207,6 +206,12 @@ prune_ssh_sockets () {
-execdir sh -c 'lsof -t "$1" >/dev/null || rm "$1"' _ {} \;
}
set_title () {
local default_title
default_title="$(basename "$PWD")"
printf "\033]0;%s\007" "${1:-$default_title}"
}
ssh_keyscan_add () {
ssh-keyscan "$@" >> "$HOME/.ssh/known_hosts"
sort -uo "$HOME/.ssh/known_hosts" "$HOME/.ssh/known_hosts"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment