diff --git a/doc.go b/doc.go index efafd49..dea4e95 100644 --- a/doc.go +++ b/doc.go @@ -54,26 +54,26 @@ The following commands are provided by lf without default keybindings: The following command line commands are provided by lf with default keybindings: - cmd-escape (default '') - cmd-comp (default '') - cmd-enter (default '' and '') - cmd-hist-next (default '') - cmd-hist-prev (default '') - cmd-delete (default '' and '') - cmd-delete-back (default '' and '') - cmd-left (default '' and '') - cmd-right (default '' and '') - cmd-beg (default '' and '') - cmd-end (default '' and '') - cmd-delete-beg (default '') - cmd-delete-end (default '') - cmd-delete-word (default '') - cmd-put (default '') - cmd-transpose (default '') - cmd-interrupt (default '') - cmd-word (default '') - cmd-word-back (default '') - cmd-capitalize-word (default '') + cmd-escape (default '') + cmd-comp (default '') + cmd-enter (default '' and '') + cmd-hist-next (default '') + cmd-hist-prev (default '') + cmd-delete (default '' and '') + cmd-delete-back (default '' and '') + cmd-left (default '' and '') + cmd-right (default '' and '') + cmd-beg (default '' and '') + cmd-end (default '' and '') + cmd-delete-beg (default '') + cmd-delete-end (default '') + cmd-delete-unix-word (default '') + cmd-put (default '') + cmd-transpose (default '') + cmd-interrupt (default '') + cmd-word (default '') + cmd-word-back (default '') + cmd-capitalize-word (default '') The following options can be used to customize the behavior of lf: diff --git a/docstring.go b/docstring.go index a1e2a83..36cacc7 100644 --- a/docstring.go +++ b/docstring.go @@ -58,26 +58,26 @@ The following commands are provided by lf without default keybindings: The following command line commands are provided by lf with default keybindings: - cmd-escape (default '') - cmd-comp (default '') - cmd-enter (default '' and '') - cmd-hist-next (default '') - cmd-hist-prev (default '') - cmd-delete (default '' and '') - cmd-delete-back (default '' and '') - cmd-left (default '' and '') - cmd-right (default '' and '') - cmd-beg (default '' and '') - cmd-end (default '' and '') - cmd-delete-beg (default '') - cmd-delete-end (default '') - cmd-delete-word (default '') - cmd-put (default '') - cmd-transpose (default '') - cmd-interrupt (default '') - cmd-word (default '') - cmd-word-back (default '') - cmd-capitalize-word (default '') + cmd-escape (default '') + cmd-comp (default '') + cmd-enter (default '' and '') + cmd-hist-next (default '') + cmd-hist-prev (default '') + cmd-delete (default '' and '') + cmd-delete-back (default '' and '') + cmd-left (default '' and '') + cmd-right (default '' and '') + cmd-beg (default '' and '') + cmd-end (default '' and '') + cmd-delete-beg (default '') + cmd-delete-end (default '') + cmd-delete-unix-word (default '') + cmd-put (default '') + cmd-transpose (default '') + cmd-interrupt (default '') + cmd-word (default '') + cmd-word-back (default '') + cmd-capitalize-word (default '') The following options can be used to customize the behavior of lf: diff --git a/eval.go b/eval.go index b468a0a..901feca 100644 --- a/eval.go +++ b/eval.go @@ -593,7 +593,7 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.cmdBuf = app.ui.cmdAccRight app.ui.cmdAccRight = nil } - case "cmd-delete-word": + case "cmd-delete-unix-word": ind := strings.LastIndex(strings.TrimRight(string(app.ui.cmdAccLeft), " "), " ") + 1 app.ui.cmdBuf = app.ui.cmdAccLeft[ind:] app.ui.cmdAccLeft = app.ui.cmdAccLeft[:ind] diff --git a/opts.go b/opts.go index ee35ff2..c189951 100644 --- a/opts.go +++ b/opts.go @@ -138,7 +138,7 @@ func init() { gOpts.cmdkeys[""] = &callExpr{"cmd-end", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-delete-beg", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-delete-end", nil, 1} - gOpts.cmdkeys[""] = &callExpr{"cmd-delete-word", nil, 1} + gOpts.cmdkeys[""] = &callExpr{"cmd-delete-unix-word", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-put", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-transpose", nil, 1} gOpts.cmdkeys[""] = &callExpr{"cmd-interrupt", nil, 1}