mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
Add bind action for executing arbitrary command (#265)
e.g. fzf --bind "ctrl-m:execute(less {})"
fzf --bind "ctrl-t:execute[tmux new-window -d 'vim {}']"
This commit is contained in:
@@ -86,10 +86,15 @@ func (i *Item) Rank(cache bool) Rank {
|
||||
|
||||
// AsString returns the original string
|
||||
func (i *Item) AsString() string {
|
||||
return *i.StringPtr()
|
||||
}
|
||||
|
||||
// StringPtr returns the pointer to the original string
|
||||
func (i *Item) StringPtr() *string {
|
||||
if i.origText != nil {
|
||||
return *i.origText
|
||||
return i.origText
|
||||
}
|
||||
return *i.text
|
||||
return i.text
|
||||
}
|
||||
|
||||
func (item *Item) colorOffsets(color int, bold bool, current bool) []colorOffset {
|
||||
|
||||
Reference in New Issue
Block a user