Skip to content

Instantly share code, notes, and snippets.

moja je slika objavljena javno


  • Bulgaristan
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
# [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")"
/usr/bin/rm -f -- "$tempfile"
You can’t perform that action at this time.