Skip to content

Commit

Permalink
Merge pull request #1 from ShawnLin013/feature/Fix-ubuntu-file-path
Browse files Browse the repository at this point in the history
Feature/fix ubuntu file path
  • Loading branch information
ShawnLin013 authored Nov 2, 2017
2 parents 8ad0403 + 5e9e200 commit 0570c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions extension.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const vscode = require('vscode');
const ncp = require("copy-paste");
const path = require("path");

function activate(context) {
let disposable = vscode.commands.registerCommand('extension.searchFileName', function (fileUri) {
if (fileUri != undefined) {
var path = fileUri.fsPath.split("\"")[0];
var name = path.split("\\")[path.split("\\").length - 1];
var name = path.basename(fileUri.fsPath);
ncp.copy(name, function() {
vscode.commands.executeCommand('workbench.action.findInFiles');
vscode.commands.executeCommand('editor.action.clipboardPasteAction');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "file-name-search",
"displayName": "File Name Search",
"description": "Quickly search file name over all files.",
"version": "0.0.1",
"version": "0.0.2",
"publisher": "Shawn",
"icon": "file-name-search-icon.png",
"license": "MIT",
Expand Down Expand Up @@ -41,7 +41,7 @@
"test": "node ./node_modules/vscode/bin/test"
},
"dependencies": {
"copy-paste": "^1.2.0"
"copy-paste": "^1.3.0"
},
"devDependencies": {
"typescript": "^2.5.2",
Expand Down

0 comments on commit 0570c19

Please sign in to comment.