2018-11-11 10:41:15 +00:00
|
|
|
# ╭─────────────╥────────────────────────╮
|
|
|
|
# │ Author: ║ File: │
|
|
|
|
# │ Andrey Orst ║ fzf-svn.kak │
|
|
|
|
# ╞═════════════╩════════════════════════╡
|
|
|
|
# │ Submodule for Hg support for fzf.kak │
|
|
|
|
# ╞══════════════════════════════════════╡
|
|
|
|
# │ GitHub.com/andreyorst/fzf.kak │
|
|
|
|
# ╰──────────────────────────────────────╯
|
|
|
|
|
|
|
|
declare-option -docstring "command to provide list of files in mercurial repository to fzf. Arguments are supported
|
|
|
|
Supported tools:
|
|
|
|
<package>: <value>:
|
|
|
|
Mercurial SCM: ""hg""
|
|
|
|
|
|
|
|
Default arguments:
|
|
|
|
""hg locate -f -0 -I .hg locate -f -0 -I .""
|
|
|
|
" \
|
|
|
|
str fzf_hg_command "hg"
|
|
|
|
|
|
|
|
map global fzf-vcs -docstring "edit file from mercurial tree" 'h' '<esc>: fzf-hg<ret>'
|
|
|
|
|
|
|
|
define-command -hidden fzf-hg %{ evaluate-commands %sh{
|
|
|
|
case $kak_opt_fzf_hg_command in
|
|
|
|
hg)
|
|
|
|
cmd="hg locate -f -0 -I .hg locate -f -0 -I ." ;;
|
|
|
|
hg*)
|
|
|
|
cmd=$kak_opt_fzf_hg_command ;;
|
|
|
|
esac
|
|
|
|
[ ! -z "${kak_client_env_TMUX}" ] && additional_flags="--expect ctrl-v --expect ctrl-s"
|
2018-11-22 12:36:11 +00:00
|
|
|
printf "%s\n" "fzf %{edit} %{$cmd} %{-m --expect ctrl-w $additional_flags}"
|
2018-11-11 10:41:15 +00:00
|
|
|
}}
|
|
|
|
|