update
This commit is contained in:
parent
50b07cd1bc
commit
a8478e89a0
|
@ -5,9 +5,9 @@ exec xrdb ~/.cache/wal/colors.Xresources &
|
||||||
exec slstatus &
|
exec slstatus &
|
||||||
exec picom -CG --config ~/.config/picom.conf &
|
exec picom -CG --config ~/.config/picom.conf &
|
||||||
exec xrandr --auto --output HDMI1 --mode 1024x768 --right-of eDP1 &
|
exec xrandr --auto --output HDMI1 --mode 1024x768 --right-of eDP1 &
|
||||||
exec setxkbmap -model -layout us,us -variant ,workman -option grp:alt_shift_toggle &
|
|
||||||
sleep 0.5s
|
|
||||||
exec xmodmap ~/.config/Xmodmap &
|
exec xmodmap ~/.config/Xmodmap &
|
||||||
|
exec setxkbmap -model -layout us,us -variant ,workman -option grp:lctrl_rshift_toggle &
|
||||||
|
sleep 0.5s
|
||||||
exec mpd &
|
exec mpd &
|
||||||
source ~/.config/env &
|
source ~/.config/env &
|
||||||
exec xset s 300 5 &
|
exec xset s 300 5 &
|
||||||
|
|
|
@ -135,7 +135,7 @@ font:
|
||||||
style: Bold Italic
|
style: Bold Italic
|
||||||
|
|
||||||
# Point size
|
# Point size
|
||||||
size: 10.0
|
size: 11.0
|
||||||
|
|
||||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||||
|
|
|
@ -22,6 +22,7 @@ export TODOTXT_DEFAULT_ACTION=ls
|
||||||
export TODOTXT_SORT_COMMAND='env LC_COLLATE=C sort -k 2,2 -k 1,1n'
|
export TODOTXT_SORT_COMMAND='env LC_COLLATE=C sort -k 2,2 -k 1,1n'
|
||||||
|
|
||||||
# ~/ clean-up
|
# ~/ clean-up
|
||||||
|
export ZPLUG_HOME="$XDG_CONFIG_HOME/zsh/zplug"
|
||||||
export MPD_HOST="$XDG_RUNTIME_DIR/mpd_socket"
|
export MPD_HOST="$XDG_RUNTIME_DIR/mpd_socket"
|
||||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
||||||
export SSH_ASKPASS=ssh-askpass
|
export SSH_ASKPASS=ssh-askpass
|
||||||
|
@ -74,6 +75,9 @@ alias cp="cp -iv"
|
||||||
alias mv="mv -iv"
|
alias mv="mv -iv"
|
||||||
alias rm="rm -v"
|
alias rm="rm -v"
|
||||||
alias g="git"
|
alias g="git"
|
||||||
|
alias gph="git push"
|
||||||
|
alias gpl="git pull"
|
||||||
|
alias gc="git commit"
|
||||||
alias f="$FILE"
|
alias f="$FILE"
|
||||||
alias e="$EDITOR"
|
alias e="$EDITOR"
|
||||||
alias v="$EDITOR"
|
alias v="$EDITOR"
|
||||||
|
|
|
@ -18,12 +18,10 @@ Plug 'akinsho/nvim-bufferline.lua'
|
||||||
Plug 'L3MON4D3/LuaSnip'
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
Plug 'nekonako/xresources-nvim'
|
Plug 'nekonako/xresources-nvim'
|
||||||
|
Plug 'tpope/vim-obsession'
|
||||||
|
|
||||||
" Wal theme
|
" Wal theme
|
||||||
Plug 'dylanaraps/wal.vim'
|
Plug 'dylanaraps/wal.vim'
|
||||||
Plug 'deviantfero/wpgtk.vim'
|
|
||||||
|
|
||||||
Plug 'chriskempson/base16-vim/'
|
|
||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
@ -52,29 +50,6 @@ fun! GotoWindow(id)
|
||||||
MaximizerToggle
|
MaximizerToggle
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" Debugger remaps
|
|
||||||
nnoremap <leader>m :MaximizerToggle!<CR>
|
|
||||||
nnoremap <leader>dd :call vimspector#Launch()<CR>
|
|
||||||
nnoremap <leader>dc :call GotoWindow(g:vimspector_session_windows.code)<CR>
|
|
||||||
nnoremap <leader>dt :call GotoWindow(g:vimspector_session_windows.tagpage)<CR>
|
|
||||||
nnoremap <leader>dv :call GotoWindow(g:vimspector_session_windows.variables)<CR>
|
|
||||||
nnoremap <leader>dw :call GotoWindow(g:vimspector_session_windows.watches)<CR>
|
|
||||||
nnoremap <leader>ds :call GotoWindow(g:vimspector_session_windows.stack_trace)<CR>
|
|
||||||
nnoremap <leader>do :call GotoWindow(g:vimspector_session_windows.output)<CR>
|
|
||||||
nnoremap <leader>de :call vimspector#Reset()<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>dtcb :call vimspector#CleanLineBreakpoint()<CR>
|
|
||||||
|
|
||||||
nmap <leader>dl <Plug>VimspectorStepInto
|
|
||||||
nmap <leader>dj <Plug>VimspectorStepOver
|
|
||||||
nmap <leader>dk <Plug>VimspectorStepOut
|
|
||||||
nmap <leader>d_ <Plug>VimspectorRestart
|
|
||||||
nnoremap <leader>d<space> :call vimspector#Continue()<CR>
|
|
||||||
|
|
||||||
nmap <leader>drc <Plug>VimspectorRunToCursor
|
|
||||||
nmap <leader>dbp <Plug>VimspectorToggleBreakpoint
|
|
||||||
nmap <leader>dcbp <Plug>VimspectorToggleConditionalBreakpoint
|
|
||||||
|
|
||||||
" <Plug>VimspectorStop
|
" <Plug>VimspectorStop
|
||||||
" <Plug>VimspectorPause
|
" <Plug>VimspectorPause
|
||||||
" <Plug>VimspectorAddFunctionBreakpoint
|
" <Plug>VimspectorAddFunctionBreakpoint
|
||||||
|
@ -90,9 +65,9 @@ set nobackup
|
||||||
set nomodeline
|
set nomodeline
|
||||||
set nocompatible
|
set nocompatible
|
||||||
set noequalalways
|
set noequalalways
|
||||||
set nowrap
|
set wrap
|
||||||
set textwidth=0
|
set textwidth=80
|
||||||
set wrapmargin=0
|
set wrapmargin=80
|
||||||
set ttimeoutlen=0
|
set ttimeoutlen=0
|
||||||
set clipboard+=unnamed
|
set clipboard+=unnamed
|
||||||
set autoread
|
set autoread
|
||||||
|
@ -187,8 +162,9 @@ nnoremap <silent> <leader>ac :center<CR>
|
||||||
nnoremap <silent> <leader>ar :right<CR>
|
nnoremap <silent> <leader>ar :right<CR>
|
||||||
nnoremap <silent> <leader>al :left<CR>
|
nnoremap <silent> <leader>al :left<CR>
|
||||||
|
|
||||||
nnoremap <silent> <leader>bn :next<CR>
|
nnoremap <silent> <leader>bb :buffers<CR>
|
||||||
nnoremap <silent> <leader>bp :prev<CR>
|
nnoremap <silent> <leader>bn :bn<CR>
|
||||||
|
nnoremap <silent> <leader>bp :bp<CR>
|
||||||
nnoremap <silent> <leader>bd :bd<CR>
|
nnoremap <silent> <leader>bd :bd<CR>
|
||||||
|
|
||||||
nnoremap <silent> <leader>ws :split<CR>
|
nnoremap <silent> <leader>ws :split<CR>
|
||||||
|
@ -210,7 +186,30 @@ vnoremap <down> <Nop>
|
||||||
vnoremap <left> <Nop>
|
vnoremap <left> <Nop>
|
||||||
vnoremap <right> <Nop>
|
vnoremap <right> <Nop>
|
||||||
|
|
||||||
" Telescope
|
"" Debugger remaps
|
||||||
|
nnoremap <leader>m :MaximizerToggle!<CR>
|
||||||
|
nnoremap <leader>dd :call vimspector#Launch()<CR>
|
||||||
|
nnoremap <leader>dc :call GotoWindow(g:vimspector_session_windows.code)<CR>
|
||||||
|
nnoremap <leader>dt :call GotoWindow(g:vimspector_session_windows.tagpage)<CR>
|
||||||
|
nnoremap <leader>dv :call GotoWindow(g:vimspector_session_windows.variables)<CR>
|
||||||
|
nnoremap <leader>dw :call GotoWindow(g:vimspector_session_windows.watches)<CR>
|
||||||
|
nnoremap <leader>ds :call GotoWindow(g:vimspector_session_windows.stack_trace)<CR>
|
||||||
|
|
||||||
|
nnoremap <leader>dtcb :call vimspector#CleanLineBreakpoint()<CR>
|
||||||
|
|
||||||
|
nmap <leader>dl <Plug>VimspectorStepInto
|
||||||
|
nmap <leader>dj <Plug>VimspectorStepOver
|
||||||
|
nmap <leader>dk <Plug>VimspectorStepOut
|
||||||
|
nmap <leader>d_ <Plug>VimspectorRestart
|
||||||
|
nnoremap <leader>d<space> :call vimspector#Continue()<CR>
|
||||||
|
|
||||||
|
nmap <leader>drc <Plug>VimspectorRunToCursor
|
||||||
|
nmap <leader>dbp <Plug>VimspectorToggleBreakpoint
|
||||||
|
nmap <leader>dcbp <Plug>VimspectorToggleConditionalBreakpoint
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"" Telescope remaps
|
||||||
nnoremap <leader>ff :Telescope find_files<cr>
|
nnoremap <leader>ff :Telescope find_files<cr>
|
||||||
nnoremap <leader>fg :Telescope live_grep<cr>
|
nnoremap <leader>fg :Telescope live_grep<cr>
|
||||||
nnoremap <leader>fb :Telescope buffers<cr>
|
nnoremap <leader>fb :Telescope buffers<cr>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 6e58336c288958a3b1ff7773fb945770126db16e
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 3116603e33ed123d61053f3b64299831fc4d534e
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 716b958145e2709e9fd3639ff24e1d1e4f26ff77
|
|
@ -1,12 +1,14 @@
|
||||||
# List of plugins
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
||||||
|
|
||||||
# remap prefix from 'C-b' to 'C-a'
|
# remap prefix from 'C-b' to 'C-a'
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-a
|
set-option -g prefix C-a
|
||||||
bind-key C-a send-prefix
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
|
# Set up window title support to be the machine and whatever window we're
|
||||||
|
# using; if using session 1 on machine hostname, and looking at window 3 whose
|
||||||
|
# name is blog, this looks like "1@hostname 3:blog"
|
||||||
|
set -g set-titles 'on'
|
||||||
|
set -g set-titles-string '#S@#T #I:#W'
|
||||||
|
|
||||||
# split panes using | and -
|
# split panes using | and -
|
||||||
bind | split-window -h
|
bind | split-window -h
|
||||||
bind - split-window -v
|
bind - split-window -v
|
||||||
|
@ -28,6 +30,42 @@ set-option -g allow-rename on
|
||||||
# rename with r
|
# rename with r
|
||||||
bind-key r command-prompt -I "#W" "rename-window '%%'"
|
bind-key r command-prompt -I "#W" "rename-window '%%'"
|
||||||
|
|
||||||
#set -g default-terminal "screen-256color-bce"
|
# use vim keybindings in copy mode
|
||||||
|
set-option -g mode-keys vi
|
||||||
|
|
||||||
|
# setup 'v' to begin selection like in Vim
|
||||||
|
#bind-key -t vi-copy v begin-selection
|
||||||
|
#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
||||||
|
|
||||||
|
# Start window indices at 1 rather than 0; easier switching (C-b 1, C-b 2, ...)
|
||||||
|
set -g base-index 1
|
||||||
|
|
||||||
|
set -g default-terminal "xterm-256color"
|
||||||
|
|
||||||
|
# Highlight windows with activity in the status line.
|
||||||
|
setw -g monitor-activity 'on'
|
||||||
|
|
||||||
|
# Escape-time makes pressing escape not be an escape key within tmux
|
||||||
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
# Allow resizing panes quickly with <prefix> shift+arrows
|
||||||
|
bind C-S-h resize-pane -L 10
|
||||||
|
bind C-S-l resize-pane -R 10
|
||||||
|
bind C-S-k resize-pane -U 10
|
||||||
|
bind C-S-j resize-pane -D 10
|
||||||
|
|
||||||
|
bind-key -n C-S-Left swap-window -t -1
|
||||||
|
bind-key -n C-S-Right swap-window -t +1
|
||||||
|
|
||||||
|
# List of plugins
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
set -g @plugin 'wfxr/tmux-power'
|
||||||
|
set -g @tmux_power_theme 'redwine'
|
||||||
|
# last saved environment is automatically restored when tmux is started.
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
run '~/.config/tmux/plugins/tpm/tpm'
|
run '~/.config/tmux/plugins/tpm/tpm'
|
||||||
|
|
|
@ -51,11 +51,15 @@ bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
|
||||||
autoload edit-command-line; zle -N edit-command-line
|
autoload edit-command-line; zle -N edit-command-line
|
||||||
bindkey '^e' edit-command-line
|
bindkey '^e' edit-command-line
|
||||||
|
|
||||||
# Load syntax highlighting; should be last.
|
# shrink-path
|
||||||
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
source ~/.config/zsh/shrink-path.plugin.zsh
|
||||||
|
setopt prompt_subst
|
||||||
|
local current_dir='$(shrink_path -f)'
|
||||||
|
|
||||||
PS1="%B%{$fg[red]%}[%~] $fg[blue]$%b %{$reset_color%}"
|
PS1="%B%{$fg[red]%}[$current_dir] $fg[blue]$%b %{$reset_color%}"
|
||||||
|
|
||||||
. ~/.local/bin/z.sh
|
. ~/.local/bin/z.sh
|
||||||
source ~/.config/env
|
source ~/.config/env
|
||||||
|
|
||||||
|
# Load syntax highlighting; should be last.
|
||||||
|
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
||||||
|
|
|
@ -0,0 +1,182 @@
|
||||||
|
# Shrink directory paths, e.g. /home/me/foo/bar/quux -> ~/f/b/quux.
|
||||||
|
#
|
||||||
|
# For a fish-style working directory in your command prompt, add the following
|
||||||
|
# to your theme or zshrc:
|
||||||
|
#
|
||||||
|
# setopt prompt_subst
|
||||||
|
# PS1='%n@%m $(shrink_path -f)>'
|
||||||
|
#
|
||||||
|
# The following options are available:
|
||||||
|
#
|
||||||
|
# -f, --fish fish simulation, equivalent to -l -s -t.
|
||||||
|
# -g, --glob Add asterisk to allow globbing of shrunk path (equivalent to -e "*")
|
||||||
|
# -l, --last Print the last directory's full name.
|
||||||
|
# -s, --short Truncate directory names to the number of characters given by -#. Without
|
||||||
|
# -s, names are truncated without making them ambiguous.
|
||||||
|
# -t, --tilde Substitute ~ for the home directory.
|
||||||
|
# -T, --nameddirs Substitute named directories as well.
|
||||||
|
# -# Truncate each directly to at least this many characters inclusive of the
|
||||||
|
# ellipsis character(s) (defaulting to 1).
|
||||||
|
# -e SYMBOL Postfix symbol(s) to indicate that a directory name had been truncated.
|
||||||
|
# -q, --quote Quote special characters in the shrunk path
|
||||||
|
#
|
||||||
|
# The long options can also be set via zstyle, like
|
||||||
|
# zstyle :prompt:shrink_path fish yes
|
||||||
|
#
|
||||||
|
# Note: Directory names containing two or more consecutive spaces are not yet
|
||||||
|
# supported.
|
||||||
|
#
|
||||||
|
# Keywords: prompt directory truncate shrink collapse fish
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 by Daniel Friesel <derf@xxxxxxxxxxxxxxxxxx>
|
||||||
|
# License: WTFPL <http://www.wtfpl.net>
|
||||||
|
#
|
||||||
|
# Ref: https://www.zsh.org/mla/workers/2009/msg00415.html
|
||||||
|
# https://www.zsh.org/mla/workers/2009/msg00419.html
|
||||||
|
|
||||||
|
shrink_path () {
|
||||||
|
setopt localoptions
|
||||||
|
setopt rc_quotes null_glob
|
||||||
|
|
||||||
|
typeset -i lastfull=0
|
||||||
|
typeset -i short=0
|
||||||
|
typeset -i tilde=0
|
||||||
|
typeset -i named=0
|
||||||
|
typeset -i length=1
|
||||||
|
typeset ellipsis=""
|
||||||
|
typeset -i quote=0
|
||||||
|
typeset -i expand=0
|
||||||
|
|
||||||
|
if zstyle -t ':prompt:shrink_path' fish; then
|
||||||
|
lastfull=1
|
||||||
|
short=1
|
||||||
|
tilde=1
|
||||||
|
fi
|
||||||
|
if zstyle -t ':prompt:shrink_path' nameddirs; then
|
||||||
|
tilde=1
|
||||||
|
named=1
|
||||||
|
fi
|
||||||
|
zstyle -t ':prompt:shrink_path' last && lastfull=1
|
||||||
|
zstyle -t ':prompt:shrink_path' short && short=1
|
||||||
|
zstyle -t ':prompt:shrink_path' tilde && tilde=1
|
||||||
|
zstyle -t ':prompt:shrink_path' glob && ellipsis='*'
|
||||||
|
zstyle -t ':prompt:shrink_path' quote && quote=1
|
||||||
|
zstyle -t ':prompt:shrink_path' expand && expand=1
|
||||||
|
|
||||||
|
while [[ $1 == -* ]]; do
|
||||||
|
case $1 in
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
-f|--fish)
|
||||||
|
lastfull=1
|
||||||
|
short=1
|
||||||
|
tilde=1
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
print 'Usage: shrink_path [-f -l -s -t] [directory]'
|
||||||
|
print ' -f, --fish fish-simulation, like -l -s -t'
|
||||||
|
print ' -g, --glob Add asterisk to allow globbing of shrunk path (equivalent to -e "*")'
|
||||||
|
print ' -l, --last Print the last directory''s full name'
|
||||||
|
print ' -s, --short Truncate directory names to the number of characters given by -#. Without'
|
||||||
|
print ' -s, names are truncated without making them ambiguous.'
|
||||||
|
print ' -t, --tilde Substitute ~ for the home directory'
|
||||||
|
print ' -T, --nameddirs Substitute named directories as well'
|
||||||
|
print ' -# Truncate each directly to at least this many characters inclusive of the'
|
||||||
|
print ' ellipsis character(s) (defaulting to 1).'
|
||||||
|
print ' -e SYMBOL Postfix symbol(s) to indicate that a directory name had been truncated.'
|
||||||
|
print ' -q, --quote Quote special characters in the shrunk path'
|
||||||
|
print ' -x, --expand Print the full path. This takes precedence over the other options'
|
||||||
|
print ''
|
||||||
|
print 'The long options can also be set via zstyle, like'
|
||||||
|
print ' zstyle :prompt:shrink_path fish yes'
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-l|--last) lastfull=1 ;;
|
||||||
|
-s|--short) short=1 ;;
|
||||||
|
-t|--tilde) tilde=1 ;;
|
||||||
|
-T|--nameddirs)
|
||||||
|
tilde=1
|
||||||
|
named=1
|
||||||
|
;;
|
||||||
|
-[0-9]|-[0-9][0-9])
|
||||||
|
length=${1/-/}
|
||||||
|
;;
|
||||||
|
-e)
|
||||||
|
shift
|
||||||
|
ellipsis="$1"
|
||||||
|
;;
|
||||||
|
-g|--glob)
|
||||||
|
ellipsis='*'
|
||||||
|
;;
|
||||||
|
-q|--quote)
|
||||||
|
quote=1
|
||||||
|
;;
|
||||||
|
-x|--expand)
|
||||||
|
expand=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
typeset -i elllen=${#ellipsis}
|
||||||
|
typeset -a tree expn
|
||||||
|
typeset result part dir=${1-$PWD}
|
||||||
|
typeset -i i
|
||||||
|
|
||||||
|
[[ -d $dir ]] || return 0
|
||||||
|
|
||||||
|
if (( expand )) {
|
||||||
|
echo "$dir"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if (( named )) {
|
||||||
|
for part in ${(k)nameddirs}; {
|
||||||
|
[[ $dir == ${nameddirs[$part]}(/*|) ]] && dir=${dir/#${nameddirs[$part]}/\~$part}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(( tilde )) && dir=${dir/#$HOME/\~}
|
||||||
|
tree=(${(s:/:)dir})
|
||||||
|
(
|
||||||
|
if [[ $tree[1] == \~* ]] {
|
||||||
|
cd -q ${~tree[1]}
|
||||||
|
result=$tree[1]
|
||||||
|
shift tree
|
||||||
|
} else {
|
||||||
|
cd -q /
|
||||||
|
}
|
||||||
|
for dir in $tree; {
|
||||||
|
if (( lastfull && $#tree == 1 )) {
|
||||||
|
result+="/$tree"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
expn=(a b)
|
||||||
|
part=''
|
||||||
|
i=0
|
||||||
|
until [[ $i -gt 99 || ( $i -ge $((length - ellen)) || $dir == $part ) && ( (( ${#expn} == 1 )) || $dir = $expn ) ]]; do
|
||||||
|
(( i++ ))
|
||||||
|
part+=$dir[$i]
|
||||||
|
expn=($(echo ${part}*(-/)))
|
||||||
|
(( short )) && [[ $i -ge $((length - ellen)) ]] && break
|
||||||
|
done
|
||||||
|
|
||||||
|
typeset -i dif=$(( ${#dir} - ${#part} - ellen ))
|
||||||
|
if [[ $dif -gt 0 ]]
|
||||||
|
then
|
||||||
|
(( quote )) && part=${(q)part}
|
||||||
|
part+="$ellipsis"
|
||||||
|
else
|
||||||
|
part="$dir"
|
||||||
|
(( quote )) && part=${(q)part}
|
||||||
|
fi
|
||||||
|
result+="/$part"
|
||||||
|
cd -q $dir
|
||||||
|
shift tree
|
||||||
|
}
|
||||||
|
echo ${result:-/}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
## vim:ft=zsh
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit c4dea766566b168a32dbfa8d10335e525ce39fcc
|
Loading…
Reference in New Issue