Skip to content

Instantly share code, notes, and snippets.

🖼
moja je slika objavljena javno

alesandar

🖼
moja je slika objavljena javno
  • Bulgaristan
Block or report user

Report or block alesandar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tmux-title.zsh
# set tmux pane and tab title
function tmux_title_precmd() {
print -Pn "\e]2;zsh\a"
print -Pn "\e]1;zsh\a"
}
function tmux_title_preexec() {
print -Pn "\e]2;$(echo "$1" | cut -d" " -f1)\a"
print -Pn "\e]1;$1\a"
# print -Pn "\e]2;$2:q\a"
View keybindings.zsh
# zle is active only if terminal is in application mode
# since only then values from $terminfo are valid
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init() { echoti smkx }
function zle-line-finish() { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
fi
# [Home] - go to beginning of line
View ranger-cd.zsh
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
/usr/bin/rm -f -- "$tempfile"
}
You can’t perform that action at this time.