dqsully / dqs-shell-commands Goto Github PK
View Code? Open in Web Editor NEWThis project forked from skywind3000/atom-shell-commands
Execute user defined shell commands (from atom-user-commands)
License: MIT License
This project forked from skywind3000/atom-shell-commands
Execute user defined shell commands (from atom-user-commands)
License: MIT License
Could be linked to #2
[Enter steps to reproduce:]
Atom: 1.15.0 ia32
Electron: 1.3.13
OS: Microsoft Windows 10 Enterprise
Thrown From: dqs-shell-commands package 2.1.1
Uncaught ReferenceError: regsiteredAtomCommands is not defined
At C:\Users\sbell\.atom\packages\dqs-shell-commands\lib\dqs-shell-commands.js:169
ReferenceError: regsiteredAtomCommands is not defined
at commands.refreshPaths (/packages/dqs-shell-commands/lib/dqs-shell-commands.js:169:17)
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at Project.module.exports.Project.removePath (/app.asar/src/project.js:314:22)
at TreeView.module.exports.TreeView.removeProjectFolder (/app.asar/node_modules/tree-view/lib/tree-view.js:1204:31)
at /app.asar/node_modules/tree-view/lib/tree-view.js:352:26)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/app.asar/src/atom-environment.js:1168:28)
at EventEmitter.outerCallback (/app.asar/src/application-delegate.js:325:25)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
-0:23.5.0 core:backspace (input.hidden-input)
-0:22.6.0 project-manager:list-projects (input.hidden-input)
-0:19.9.0 editor:delete-to-beginning-of-word (input.hidden-input)
2x -0:19.4.0 core:backspace (input.hidden-input)
-0:18.8.0 editor:consolidate-selections (input.hidden-input)
-0:18.8.0 dqs-shell-commands-config:hide (input.hidden-input)
-0:18.8.0 core:cancel (input.hidden-input)
-0:14.2.0 tree-view:remove-project-folder (span.name.icon.icon-repo)
atom-alignment 0.12.1
atom-html-preview 0.1.22
atom-keyboard-macros-vim 0.1.6
atom-shell-commands 1.5.0
atom-terminal 0.8.0
atom-ternjs 0.16.1
atomic-chrome 0.3.0
calc 0.4.0
character-table 0.4.3
column-select 0.2.0
ctrl-dir-scroll 0.2.2
date 1.1.1
docblockr 0.9.1
docs undefined
dqs-shell-commands 2.1.1
duplicate-removal 0.1.3
git-log 0.4.1
git-plus 7.1.0
json-converter 0.2.4
language-abap 1.1.0
language-diff 0.7.0
language-latex 1.0.0
language-mediawiki 2.2.0
language-vbscript 0.7.0
last-cursor-position 0.9.0
linter 1.11.21
linter-coffeelint 1.2.1
linter-eslint 8.0.0
linter-jsonlint 1.3.0
markdown-scroll-sync 2.1.2
markdown-themeable-pdf 1.2.0
markdown-writer 2.6.3
merge-conflicts 1.4.4
pdf-view 0.54.0
project-manager 3.3.3
simple-panes 1.1.0
sort-lines 0.14.0
sorter 0.1.2
split-diff 1.1.1
symbol-gen 1.3.1
tablr 1.8.1
tabs-to-spaces 1.0.3
terminal-status 1.6.8
vim-mode 0.66.0
vim-mode-plus 0.82.0
vim-mode-plus-keymaps-for-surround 0.2.1
vim-surround 0.8.1
Hi,
I find the autoclose option so useful I'd like to use it anywere but I found one one program (a linter) where the exit code is 0 even when error are found. I have configured the matchs array but autoclose still close the console when a match is found.
so in short is there a way to prevent autoclose when a match is found without a care to return code ?
[Enter steps to reproduce:]
~/.atom/global-shell-commands.cson
The command is available in the command palette. It's only when the command is executed.
Test command I was using opens Windows explorer in the file's current directory. This works from a project-specific .shell-commands.cson
file, just a problem with the global cson file.
commands: [
{
name: "exp"
command: "explorer"
arguments: [
"."
]
options:
cwd: "{FileDir}"
}
]
Atom: 1.15.0 ia32
Electron: 1.3.13
OS: Microsoft Windows 10 Enterprise
Thrown From: dqs-shell-commands package 2.2.0
Uncaught ReferenceError: path is not defined
At C:\Users\sbell\.atom\packages\dqs-shell-commands\lib\dqs-shell-commands.js:228
ReferenceError: path is not defined
at /packages/dqs-shell-commands/lib/dqs-shell-commands.js:228:92)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at Object.didConfirmSelection (/app.asar/node_modules/command-palette/lib/command-palette-view.js:106:29)
at SelectListView.confirmSelection (/app.asar/node_modules/atom-select-list/src/select-list-view.js:301:20)
at HTMLDivElement.coreConfirm (/app.asar/node_modules/atom-select-list/src/select-list-view.js:67:14)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
at /app.asar/src/window-event-handler.js:3:59)
-0:47.5.0 command-palette:toggle (input.hidden-input)
-0:45.5.0 core:confirm (input.hidden-input)
-0:45.5.0 dqs-shell-commands:exp (input.hidden-input)
2x -0:40 vim-mode-plus:move-down (input.hidden-input)
-0:38.4.0 vim-mode-plus:insert-after-end-of-line (input.hidden-input)
-0:37.6.0 core:move-left (input.hidden-input)
-0:37.2.0 vim-mode-plus:activate-normal-mode (input.hidden-input)
-0:36.8.0 core:save (input.hidden-input)
-0:35.7.0 vim-mode-plus:activate-normal-mode (atom-text-editor.editor.vim-mode-plus.is-focused.normal-mode)
-0:34 command-palette:toggle (input.hidden-input)
2x -0:31.3.0 core:move-down (input.hidden-input)
-0:30.7.0 core:confirm (input.hidden-input)
-0:30.7.0 dqs-shell-commands:exp2 (input.hidden-input)
-0:23.6.0 command-palette:toggle (input.hidden-input)
-0:22.1.0 core:confirm (input.hidden-input)
-0:22.1.0 dqs-shell-commands:exp (input.hidden-input)
atom-alignment 0.12.1
atom-html-preview 0.1.22
atom-keyboard-macros-vim 0.1.6
atom-terminal 0.8.0
atom-ternjs 0.16.1
atomic-chrome 0.3.0
calc 0.4.0
character-table 0.4.3
column-select 0.2.0
ctrl-dir-scroll 0.2.2
date 1.1.1
docblockr 0.9.1
docs undefined
dqs-shell-commands 2.2.0
duplicate-removal 0.1.3
git-log 0.4.1
git-plus 7.1.0
json-converter 0.2.4
language-abap 1.1.0
language-diff 0.7.0
language-latex 1.0.0
language-mediawiki 2.2.0
language-vbscript 0.7.0
last-cursor-position 0.9.0
linter 1.11.21
linter-coffeelint 1.2.1
linter-eslint 8.0.0
linter-jsonlint 1.3.0
markdown-scroll-sync 2.1.2
markdown-themeable-pdf 1.2.0
markdown-writer 2.6.3
merge-conflicts 1.4.4
pdf-view 0.54.0
project-manager 3.3.3
simple-panes 1.1.0
sort-lines 0.14.0
sorter 0.1.2
split-diff 1.1.1
symbol-gen 1.3.1
tablr 1.8.1
tabs-to-spaces 1.0.3
terminal-status 1.6.8
vim-mode 0.66.0
vim-mode-plus 0.82.0
vim-mode-plus-keymaps-for-surround 0.2.1
vim-surround 0.8.1
Hi! Thanks for maintaining the dqs-shell-commands package!
In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save
asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise
that resolves when the save is complete. Because of this, a few other Atom APIs that use save
have similarly become async:
Pane.close
TextBuffer.save
TextEditor.save
Pane.saveItem
Pane.saveItemAs
Pane.saveActiveItem
Pane.saveActiveItemAs
Pane.saveItems
Workspace.saveActivePaneItem
Workspace.saveActivePaneItemAs
We think this package could be impacted by this upgrade because it calls the changed methods in the following places:
TextEditor.save
We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.
It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:
Please let me know if you have any questions. I'd be happy to help!
I use project-manager to switch between projects frequently.
When dqs-shell-commands is enabled I can't use project-manger to switch projects (a restart of atom is required to switch). Disabling dqs-shell-commands restores the expected project-manager behaviour. Installing atom-shell-commands instead doesn't cause an issue with project-manager, so I suspect it's something that's been introduced since the fork, maybe some way dqsshellcommands figures out which project it's in?
Nice work on this!
.shell-commands
in each project is useful for project but there are some commands I'd like to configure to run globally, ie in atom's config.cson. Still experiencing similar issues to atom-shell-commands with the config.cson entry being wiped when the package reads it.
Love the use of finicky in the README :)
For reference, the issues in atom-shell-commands describing the similar problem:
Hello,
I wanted to know if it is possible in the config file to do something in order for a command to work only in a scope.
What I want to know is if I have a config file like this :
commands: [
{
name: "javac"
command: "javac"
arguments: [
"{FileName}"
]
options:
cwd: "{FileDir}"
keymap: 'ctrl-2'
},
{
name: "gcc"
command: "gcc"
arguments: [
"{FileName}"
]
options:
cwd: "{FileDir}"
keymap: 'ctrl-2'
}
if it is possible to have an option for javac
to work only in .java
and gcc
to work only in .c
It should append the rest of the message.
When a program is sending a lot of information, it doesn't always update the output text.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.