-
Notifications
You must be signed in to change notification settings - Fork 4
/
icl.fish
31 lines (24 loc) · 891 Bytes
/
icl.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#===============================================================================
# icl - interactive command library
#===============================================================================
#TODO: check if icl command exists and skip function definition if it doesn't
function f_run_icl
icl | read foo
if [ $foo ]
commandline $foo
else
commandline ''
end
end
# this will only work for fish 3
if fish --version | grep 'version 3' > /dev/null
bind \ct f_run_icl
end
# if you run older versions of fish, you have to define the keybind yourself
# inside your fish_user_key_bindings function:
# function fish_user_key_bindings
# bind \ct f_run_icl
# end
#===============================================================================
# END icl - interactive command library END
#===============================================================================