Move from omf to fisher for fishshell
This commit is contained in:
1
config/fish/conf.d/fisher.fish
Normal file
1
config/fish/conf.d/fisher.fish
Normal file
@ -0,0 +1 @@
|
||||
fisher copy-user-key-bindings
|
||||
9
config/fish/conf.d/fzf.fish
Normal file
9
config/fish/conf.d/fzf.fish
Normal file
@ -0,0 +1,9 @@
|
||||
set -q FZF_TMUX_HEIGHT; or set -U FZF_TMUX_HEIGHT "40%"
|
||||
set -q FZF_DEFAULT_OPTS; or set -U FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT"
|
||||
set -q FZF_LEGACY_KEYBINDINGS; or set -U FZF_LEGACY_KEYBINDINGS 1
|
||||
set -q FZF_PREVIEW_FILE_CMD; or set -U FZF_PREVIEW_FILE_CMD "head -n 10"
|
||||
set -q FZF_PREVIEW_DIR_CMD; or set -U FZF_PREVIEW_DIR_CMD "ls"
|
||||
|
||||
function fzf_uninstall -e fzf_uninstall
|
||||
# Erase env vars and __fzf functions here.
|
||||
end
|
||||
41
config/fish/conf.d/fzf_key_bindings.fish
Normal file
41
config/fish/conf.d/fzf_key_bindings.fish
Normal file
@ -0,0 +1,41 @@
|
||||
if test "$FZF_LEGACY_KEYBINDINGS" -eq 1
|
||||
bind \ct '__fzf_find_file'
|
||||
bind \cr '__fzf_reverse_isearch'
|
||||
bind \ec '__fzf_cd'
|
||||
bind \eC '__fzf_cd --hidden'
|
||||
bind \cg '__fzf_open'
|
||||
bind \co '__fzf_open --editor'
|
||||
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \ct '__fzf_find_file'
|
||||
bind -M insert \cr '__fzf_reverse_isearch'
|
||||
bind -M insert \ec '__fzf_cd'
|
||||
bind -M insert \eC '__fzf_cd --hidden'
|
||||
bind -M insert \cg '__fzf_open'
|
||||
bind -M insert \co '__fzf_open --editor'
|
||||
end
|
||||
else
|
||||
bind \cf '__fzf_find_file'
|
||||
bind \cr '__fzf_reverse_isearch'
|
||||
bind \eo '__fzf_cd'
|
||||
bind \eO '__fzf_cd --hidden'
|
||||
bind \cg '__fzf_open'
|
||||
bind \co '__fzf_open --editor'
|
||||
|
||||
if bind -M insert >/dev/null 2>/dev/null
|
||||
bind -M insert \cf '__fzf_find_file'
|
||||
bind -M insert \cr '__fzf_reverse_isearch'
|
||||
bind -M insert \eo '__fzf_cd'
|
||||
bind -M insert \eO '__fzf_cd --hidden'
|
||||
bind -M insert \cg '__fzf_open'
|
||||
bind -M insert \co '__fzf_open --editor'
|
||||
end
|
||||
end
|
||||
|
||||
if set -q FZF_COMPLETE
|
||||
bind \t '__fzf_complete'
|
||||
end
|
||||
|
||||
function fzf_key_bindings_uninstall -e fzf_key_bindings_uninstall
|
||||
# Erase key bindings here.
|
||||
end
|
||||
@ -1,7 +0,0 @@
|
||||
# Path to Oh My Fish install.
|
||||
set -q XDG_DATA_HOME
|
||||
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
|
||||
or set -gx OMF_PATH "$HOME/.local/share/omf"
|
||||
|
||||
# Load Oh My Fish configuration.
|
||||
source $OMF_PATH/init.fish
|
||||
44
config/fish/conf.d/z.fish
Normal file
44
config/fish/conf.d/z.fish
Normal file
@ -0,0 +1,44 @@
|
||||
if test -z "$Z_DATA"
|
||||
if test -z "$XDG_DATA_HOME"
|
||||
set -U Z_DATA_DIR "$HOME/.local/share/z"
|
||||
else
|
||||
set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
|
||||
end
|
||||
set -U Z_DATA "$Z_DATA_DIR/data"
|
||||
end
|
||||
|
||||
if test ! -e "$Z_DATA"
|
||||
if test ! -e "$Z_DATA_DIR"
|
||||
mkdir -p -m 700 "$Z_DATA_DIR"
|
||||
end
|
||||
touch "$Z_DATA"
|
||||
end
|
||||
|
||||
if test -z "$Z_CMD"
|
||||
set -U Z_CMD "z"
|
||||
end
|
||||
|
||||
set -U ZO_CMD "$Z_CMD"o
|
||||
|
||||
if test ! -z $Z_CMD
|
||||
function $Z_CMD -d "jump around"
|
||||
__z $argv
|
||||
end
|
||||
end
|
||||
|
||||
if test ! -z $ZO_CMD
|
||||
function $ZO_CMD -d "open target dir"
|
||||
__z -d $argv
|
||||
end
|
||||
end
|
||||
|
||||
if not set -q Z_EXCLUDE
|
||||
set -U Z_EXCLUDE $HOME
|
||||
end
|
||||
|
||||
# Setup completions once first
|
||||
__z_complete
|
||||
|
||||
function __z_on_variable_pwd --on-variable PWD
|
||||
__z_add
|
||||
end
|
||||
Reference in New Issue
Block a user