2007-09-25 16:14:47 +00:00
|
|
|
|
|
|
|
function __fish_bind_test1
|
2012-06-16 00:30:10 +00:00
|
|
|
set -l args
|
|
|
|
set -l use_keys no
|
|
|
|
for i in (commandline -poc)
|
|
|
|
switch $i
|
|
|
|
case -k --k --ke --key
|
2016-11-28 05:27:22 +00:00
|
|
|
set use_keys yes
|
2007-09-25 16:14:47 +00:00
|
|
|
|
2012-06-16 00:30:10 +00:00
|
|
|
case "-*"
|
2007-09-25 16:14:47 +00:00
|
|
|
|
2012-06-16 00:30:10 +00:00
|
|
|
case "*"
|
2016-11-28 05:27:22 +00:00
|
|
|
set args $args $i
|
2012-06-16 00:30:10 +00:00
|
|
|
end
|
|
|
|
end
|
2007-09-25 16:14:47 +00:00
|
|
|
|
2012-06-16 00:30:10 +00:00
|
|
|
switch $use_keys
|
|
|
|
case yes
|
2016-11-28 05:27:22 +00:00
|
|
|
switch (count $args)
|
|
|
|
case 1
|
|
|
|
return 0
|
|
|
|
end
|
2012-06-16 00:30:10 +00:00
|
|
|
end
|
|
|
|
return 1
|
2007-09-25 16:14:47 +00:00
|
|
|
end
|