aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions
diff options
context:
space:
mode:
authorGravatar Maxim Gonchar <gmaxfl@gmail.com>2014-01-20 17:03:46 +0400
committerGravatar Maxim Gonchar <gmaxfl@gmail.com>2014-01-20 17:03:46 +0400
commit1514ab8ec5e4d7effe5639bf51b04b1e1f97b1b0 (patch)
tree8966fdde67b605c34746a6083b06bd2af86306dd /share/functions
parent35919000709c00274f2fbb56db2f2924585edd05 (diff)
Retab
Diffstat (limited to 'share/functions')
-rw-r--r--share/functions/__fish_cursor_konsole.fish18
-rw-r--r--share/functions/__fish_cursor_xterm.fish26
-rw-r--r--share/functions/fish_default_key_bindings.fish8
-rw-r--r--share/functions/fish_vi_cursor.fish48
4 files changed, 50 insertions, 50 deletions
diff --git a/share/functions/__fish_cursor_konsole.fish b/share/functions/__fish_cursor_konsole.fish
index 381ff9b9..12d23c69 100644
--- a/share/functions/__fish_cursor_konsole.fish
+++ b/share/functions/__fish_cursor_konsole.fish
@@ -1,11 +1,11 @@
function __fish_cursor_konsole -d 'Set cursor (konsole)'
- set -l shape $argv[1]
- switch "$shape"
- case block
- echo -en '\e]50;CursorShape=0\x7'
- case underscore
- echo -en '\e]50;CursorShape=2\x7'
- case line
- echo -en '\e]50;CursorShape=1\x7'
- end
+ set -l shape $argv[1]
+ switch "$shape"
+ case block
+ echo -en '\e]50;CursorShape=0\x7'
+ case underscore
+ echo -en '\e]50;CursorShape=2\x7'
+ case line
+ echo -en '\e]50;CursorShape=1\x7'
+ end
end
diff --git a/share/functions/__fish_cursor_xterm.fish b/share/functions/__fish_cursor_xterm.fish
index 1a0909e8..8a8948b1 100644
--- a/share/functions/__fish_cursor_xterm.fish
+++ b/share/functions/__fish_cursor_xterm.fish
@@ -1,16 +1,16 @@
function __fish_cursor_xterm -d 'Set cursor (xterm)'
- set -l shape $argv[1]
+ set -l shape $argv[1]
- switch "$shape"
- case block
- set shape 2
- case underscore
- set shape 4
- case line
- set shape 6
- end
- if contains blink $argv
- set shape (expr $shape - 1)
- end
- echo -en "\e[$shape q"
+ switch "$shape"
+ case block
+ set shape 2
+ case underscore
+ set shape 4
+ case line
+ set shape 6
+ end
+ if contains blink $argv
+ set shape (expr $shape - 1)
+ end
+ echo -en "\e[$shape q"
end
diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish
index f3ac2e75..ffb4371f 100644
--- a/share/functions/fish_default_key_bindings.fish
+++ b/share/functions/fish_default_key_bindings.fish
@@ -1,9 +1,9 @@
function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fish" -a mode
- if not set -q mode[1]
- # Clear earlier bindings, if any
- bind --erase --all
- end
+ if not set -q mode[1]
+ # Clear earlier bindings, if any
+ bind --erase --all
+ end
# This is the default binding, i.e. the one used if no other binding matches
bind $argv "" self-insert
diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish
index 141bd2f5..c00485a9 100644
--- a/share/functions/fish_vi_cursor.fish
+++ b/share/functions/fish_vi_cursor.fish
@@ -1,31 +1,31 @@
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
- set fcn
- switch "$terminal"
- case auto
- if set -q KONSOLE_PROFILE_NAME
- set fcn __fish_cursor_konsole
- else if set -q XTERM_LOCALE
- set fcn __fish_cursor_xterm
- else
- return 1
- end
- end
+ set fcn
+ switch "$terminal"
+ case auto
+ if set -q KONSOLE_PROFILE_NAME
+ set fcn __fish_cursor_konsole
+ else if set -q XTERM_LOCALE
+ set fcn __fish_cursor_xterm
+ else
+ return 1
+ end
+ end
- set -g fish_cursor_insert line
- set -g fish_cursor_default block
- set -g fish_cursor_unknown block blink
+ set -g fish_cursor_insert line
+ set -g fish_cursor_default block
+ set -g fish_cursor_unknown block blink
- echo "
+ echo "
function fish_cursor_vi_handle --on-variable fish_bind_mode
- set -l varname fish_cursor_\$fish_bind_mode
- if not set -q \$varname
- set varname fish_cursor_unknown
- end
- #echo \$varname \$\$varname
- $fcn \$\$varname
+ set -l varname fish_cursor_\$fish_bind_mode
+ if not set -q \$varname
+ set varname fish_cursor_unknown
+ end
+ #echo \$varname \$\$varname
+ $fcn \$\$varname
end
- " | source
+ " | source
end