aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/fish_vi_cursor.fish
diff options
context:
space:
mode:
authorGravatar Julian Aron Prenner <julian@linux4you.it>2014-01-20 13:07:32 +0100
committerGravatar Julian Aron Prenner <julian@linux4you.it>2014-01-20 13:07:32 +0100
commit44c6fa68cfae06337801da42e273eeee5ef90a67 (patch)
treea38e209993b6f4d90fe6edd17491fac23bbb28c4 /share/functions/fish_vi_cursor.fish
parent7df4a966eae97652d4d9291fccd74ab5c10de4f9 (diff)
Make Ctrl-x autocomplete suggestions; cosmetics
Diffstat (limited to 'share/functions/fish_vi_cursor.fish')
-rw-r--r--share/functions/fish_vi_cursor.fish106
1 files changed, 53 insertions, 53 deletions
diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish
index e59d715f..e3dae47a 100644
--- a/share/functions/fish_vi_cursor.fish
+++ b/share/functions/fish_vi_cursor.fish
@@ -1,59 +1,59 @@
function fish_vi_cursor -d 'Set cursor shape for different vi modes'
- set -l terminal $argv[1]
- set -q terminal[1]; or set terminal auto
+ set -l terminal $argv[1]
+ set -q terminal[1]; or set terminal auto
- switch "$terminal"
- case auto
- if set -q KONSOLE_PROFILE_NAME
- set terminal konsole
- else if set -q XTERM_LOCALE
- set terminal xterm
- else
- #echo Not found
- return 1
- end
- end
-
- set -l command
- set -l start
- set -l end
- set -l shape_block
- set -l shape_line
- set -l shape_underline
- switch "$terminal"
- case konsole iterm
- set command echo -en
- set start "\e]50;"
- set end "\x7"
- set shape_block 'CursorShape=0'
- set shape_line 'CursorShape=1'
- set shape_underline 'CursorShape=2'
- case xterm
- set command echo -en
- set start '\e['
- set end ' q'
- set shape_block '2'
- set shape_underline '4'
- set shape_line '6'
- end
- if not set -q command[1]
- #echo not found
+ switch "$terminal"
+ case auto
+ if set -q KONSOLE_PROFILE_NAME
+ set terminal konsole
+ else if set -q XTERM_LOCALE
+ set terminal xterm
+ else
+ #echo Not found
return 1
end
- set -g fish_cursor_insert $start$shape_line$end
- set -g fish_cursor_default $start$shape_block$end
- set -g fish_cursor_other $start$shape_block$end
+ end
- echo "
- function fish_vi_cursor_handle --on-variable fish_bind_mode
- switch \$fish_bind_mode
- case insert
- $command \$fish_cursor_insert
- case default
- $command \$fish_cursor_default
- case '*'
- $command \$fish_cursor_other
- end
- end
- " | source
+ set -l command
+ set -l start
+ set -l end
+ set -l shape_block
+ set -l shape_line
+ set -l shape_underline
+ switch "$terminal"
+ case konsole iterm
+ set command echo -en
+ set start "\e]50;"
+ set end "\x7"
+ set shape_block 'CursorShape=0'
+ set shape_line 'CursorShape=1'
+ set shape_underline 'CursorShape=2'
+ case xterm
+ set command echo -en
+ set start '\e['
+ set end ' q'
+ set shape_block '2'
+ set shape_underline '4'
+ set shape_line '6'
+ end
+ if not set -q command[1]
+ #echo not found
+ return 1
+ end
+ set -g fish_cursor_insert $start$shape_line$end
+ set -g fish_cursor_default $start$shape_block$end
+ set -g fish_cursor_other $start$shape_block$end
+
+ echo "
+ function fish_vi_cursor_handle --on-variable fish_bind_mode
+ switch \$fish_bind_mode
+ case insert
+ $command \$fish_cursor_insert
+ case default
+ $command \$fish_cursor_default
+ case '*'
+ $command \$fish_cursor_other
+ end
+ end
+ " | source
end