You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, mobile users have autocorrect on or by default first letter as a capital letter. So we can have a .tolowercase() function on input string.
So can I proceed with this issue and make a pr. Is it a valuable change?
The text was updated successfully, but these errors were encountered:
It's currently not possible if you're going the ususal method, but I've found a workaround by using commandPassThrough instead of commands for all my commands.
commands(cmd,print){constcommand=cmd.join(" ").toLowerCase();switch(command){case"email":
print("hello@mohammedfarish.com");break;default:
print(`bash: command not found: ${cmd.join(" ")}`);break;}}renderHelp(){constcommandsList=[{name: "clear",description: "Clears the terminal",},{name: "email",description: "Displays my email",},];constparsedArray=[];commandsList.forEach((comm)=>{const{ name, description }=comm;parsedArray.push(`${name} - ${description}`);});returnparsedArray.join("\n\n");}render(){constcommandList={help: ()=>this.renderHelp(),"-h": ()=>this.renderHelp(),"--h": ()=>this.renderHelp(),};return(<TerminalcommandPassThrough={(cmd,print)=>this.commands(cmd,print)}commands={commandList}/>)
Generally, mobile users have autocorrect on or by default first letter as a capital letter. So we can have a .tolowercase() function on input string.
So can I proceed with this issue and make a pr. Is it a valuable change?
The text was updated successfully, but these errors were encountered: