Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Functions: don't display osascript call #14

Merged
merged 3 commits into from
Jul 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions functions/__fish_apple_touchbar_bind_key.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ function __fish_apple_touchbar_bind_key --argument-names fn_number fn_text fn_co
end

if [ "$bind_option" = "-s" ]
bind $vimbind --key f$fn_number "commandline --replace '$fn_command'; commandline --function execute"
else
bind --key f$fn_number $fn_command
if string match --quiet -- "*osascript*" "$fn_command"
bind $vimbind --key f$fn_number "eval ($fn_command)"
return
end

bind $vimbind --key f$fn_number "commandline --replace '$fn_command'; commandline --function execute"
return
end

bind --key f$fn_number $fn_command
end