2const shebangRegex = require('shebang-regex');
4module.exports = (string = '') => {
5 const match = string.match(shebangRegex);
11 const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
12 const binary = path.split('/').pop();
14 if (binary === 'env') {
18 return argument ? `${binary} ${argument}` : binary;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list