Giter VIP home page Giter VIP logo

fish-completion's People

Contributors

esdmr avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

jh0680

fish-completion's Issues

Multiline arguments fail

While calculating the replacement range, given the current token (which is currently coerced into one line), it assumes that the whole thing is in one line, which causes the range to have a negative column. Unfortunately, the output of completions are also split on that newline, so we cannot actually use the output. Again, this would be a non-issue with #209, but I have not figured it out yet. Regardless, to solve it without a parser, we can consider only the last line of the argument and modify that only, skipping the other lines in the completions.

Test on VSCode server

Last time I tried it on GitHub Codespaces the completion part didn’t work (I think…).

Mac OS: `script: illegal option -- e`

Hi! I'm trying to use your extension with VSCode 1.81.1 running on mac os 13.4.1. No completions show up, and I'm getting the following errors in the output window:

Failure: Error: Command failed with exit code 1: script -e -q -c fish -iPC 'source $_FISH_COMPLETION_WORKER' /dev/null
script: illegal option -- e
usage: script [-adkpqr] [-t time] [file [command ...]]

With Mac OS, -e and -c are always implied, and the order of arguments is script <file> <command>..., so you need to do the following:

script -q /dev/null fish ...

For now, I've been able to make an ad-hoc fix by placing the following script python file into my path:

#! /usr/bin/env python

import os
import subprocess
import sys

if " ".join(sys.argv[1:]) == "-e -q -c fish -iPC 'source $_FISH_COMPLETION_WORKER' /dev/null":
    args = (
        "/usr/bin/script -q /dev/null fish -iPC source".split()
        + [os.environ['_FISH_COMPLETION_WORKER']]
    )
    exit(subprocess.run(args).returncode)
else:
    exit(subprocess.run(["/usr/bin/script"] + sys.argv[1:]).returncode)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update actions/cache digest to e12d46a
  • Update actions/checkout digest to f43a0e5
  • Update actions/setup-node digest to 1a4442c
  • Update actions/cache action to v4
  • Update actions/checkout action to v4
  • Update actions/setup-node action to v4
  • Lock file maintenance

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

  • Update dependency @types/node to v16.18.86
  • Update dependency esbuild to v0.20.1
  • Update pnpm to v8.15.4
  • Update dependency @vscode/vsce to v2.24.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
  • actions/setup-node v3@8c91899e586c5b171469028077307d293428b516
  • actions/cache v3@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
.github/workflows/renovate.yaml
  • actions/checkout v3@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
npm
package.json
  • @changesets/cli 2.27.1
  • @rollup/plugin-commonjs 25.0.7
  • @rollup/plugin-node-resolve 15.2.3
  • @types/node 16.18.79
  • @types/vscode 1.75.1
  • @vscode/vsce 2.23.0
  • esbuild 0.20.0
  • execa 7.2.0
  • rollup 3.29.4
  • rollup-plugin-esbuild 5.0.0
  • rollup-plugin-string 3.0.0
  • xo 0.56.0
  • node >=16
  • vscode ^1.75.0
  • pnpm 8.15.1

  • Check this box to trigger a request for Renovate to run again on this repository

Parser-based completion and assistance

Currently, for completion, we send the whole script up to the cursor to fish, and for assistant we use a rather horrible RegExp to parse stuff, which has a ton of false negatives (and hopefully no false positives).

What if we were to create a parser for fish shell and use that to find functions and variables and only send the current command to fish to complete? It also fixes any problem with finding the selected argument and if and while statements, which are broken for some reason.

Edit: See https://github.com/esdmr/fish-parsing-parables

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.