Skip to content

Commit

Permalink
resolve #34
Browse files Browse the repository at this point in the history
  • Loading branch information
loreanvictor committed Dec 28, 2023
1 parent 38a4467 commit e8f1709
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
19 changes: 16 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tmplr",
"version": "0.3.0",
"version": "0.3.1",
"description": "Easy templating for repositories",
"bin": "dist/src/index.js",
"engines": {
Expand Down Expand Up @@ -59,7 +59,7 @@
"@sindresorhus/tsconfig": "^2.0.0",
"@types/degit": "^2.8.3",
"@types/git-url-parse": "^9.0.1",
"@types/jest": "^27.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.31",
"@types/react": "^18.0.9",
"@types/semver": "^7.3.9",
Expand All @@ -77,6 +77,7 @@
"ink-testing-library": "^2.1.0",
"jest": "^28.1.0",
"jest-extended": "^4.0.0",
"sleep-promise": "^9.1.0",
"ts-jest": "^28.0.2",
"ts-node": "^10.7.0",
"typescript": "^4.6.4"
Expand Down
7 changes: 5 additions & 2 deletions src/components/prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ export function Prompt({ prompt }: PromptProps) {
}, [prompt])


useInput((input) => {
if (!touched && input[0]?.match(/\w/)) {
useInput((input, key) => {
if (!touched && !(
key.leftArrow || key.rightArrow || key.upArrow || key.downArrow
|| key.meta || key.ctrl || key.shift || key.pageDown || key.pageUp
)) {
setValue(input)
}

Expand Down

0 comments on commit e8f1709

Please sign in to comment.