Giter Site home page Giter Site logo

Comments (2)

Screwtapello avatar Screwtapello commented on May 23, 2024

If I echo -- %val{history} then it looks like you're right - two edits instead of one that includes history notation.

However, if I echo -quoting shell -- %val{history} I get:

'-' '554880' '1' '0' '554881' '-' '+0.0|sd +0.0|testing'

...which shows that Kakoune does know where the "breaks" are between each item, and there's no ambiguity.

%val{history} (like many other expansions) expands to a list of words, not a single word (unless you use it inside double quotes). As long as you pass the result in contexts that accept a list of words (such as a Kakoune or shell command), or quote it properly (such as with echo -quoting), it should be fine.

In particular, if you want to export Kakoune's history to an external program for analysis/processing, you'd probably want to make a FIFO somewhere in a temporary directory, have the external program read from it, and use echo -quoting kakoune -to-file /path/to/my/fifo to send the data to the program (using Kakoune quoting because it's probably easier for some other program to parse than shell quoting).

from kakoune.

jdugan6240 avatar jdugan6240 commented on May 23, 2024

%val{history} (like many other expansions) expands to a list of words, not a single word (unless you use it inside double quotes). 

Yeah, I figured there was something I missed. I had a hard time believing that an editor with this much thought put into its design would have such an obvious oversight. Turns out it doesn't 🙂.

from kakoune.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.