Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have created few hooks and user defined commands in GDB. Now I just want to know How I can remove or change them.
Thanks,
I don't think there is a way to remove them. That seems like an oversight in the gdb command language.
You can redefine a user-defined command using the define command again. You can make your command a no-op by just defining the command to do nothing. gdb will ask if you really want to redefine a command:
(gdb) define qqq
Type commands for definition of "qqq".
End with a line saying just "end".
>print 23
>end
(gdb) define qqq
Redefine command "qqq"? (y or n) y
Type commands for definition of "qqq".
End with a line saying just "end".
>end
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
As an exercise we need to explain what happens when we leave an open paranthesesis in a print statement.
Doing so does not give us an error nor a value, the resulting line gives us a prompt consisting of dots instead of arrows. Does this situation/prompt have a name and can someone explain?
for example:
>>>print('Hello'
...
The official name is secondary prompt. It is used when inputting incomplete constructs, for example not closing any set of parentheses or when defining a function.
The three greater-than signs (>>>) prompts for the next command, which the interpreter can process at once. The three dots (...), in its turn, prompts the continuation lines, such as print(: interpreter can't process your command at once, because it, in this case, doesn't know the arguments you want to pass to the function.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I am trying to run a program via its CLI. The command is something like this:
./Program -t -s -variables Param1=Value1,Param2="Value2=SubValue"
However, the Param2 is not accepted by the program. How can I pass in the "Value2=Subvalue" as is?
It depends on how the program is parsing the command line arguments. My guess is that the program is setting Param1 equal to Value1,Param2=Value2=SubValue. Try a space between Param1 and Param2. What program is this? What does the documentation say?
Without knowing which command it's a bit difficult to know how it expects its parameters, but generally they are not separated by commas. Try removing that and putting a space there instead.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm looking for a way to correct bash commands if they have been misspelled.
Let's say you have installed a program called "FooBar" but you type "foobar" (or foo bar or FOOBAR or foebar) in your shell. Is there any way to check if something similar to what you are looking for exists in your PATH?
I'm thinking about writing a bash script that normalizes user input and uses the Levenshtein distance algorithm to check what they have typed against anything in PATH. But maybe there's already something is written out there or a better way to accomplish this task.
Any suggestions?
If you problem is case-sensitivity only, then you can switch this off in the readline configuration by the following:
echo "set completion-ignore-case On" >> ~/.inputrc
However, if you are seeking for some clever mechanism to execute similar commands (by using fuzzy logic for example) I'll not recommend to use such tool in a command-line since it could be very dangerous.
Imagine what could happen for example in commands like rmv? is it rm or mv? .. only the user can answer this question.
Note: This may be useful if you are running a Cygwin env where case-sensitivity is not a problem. In Linux commands are case sensitive. So switching this functionality off is not a good idea.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I m learning very basic Linux command where i was typing very basic command ,and i don't know exactly what i typed or happened i got only ">" in my terminal.
Don't know what i should type?
Thanks
This is shown when the terminal is expecting you to finish typing in your command. For example:
git commit -m 'asdasdasdasd <enter>
will lead to a > shown in the next line, because the terminal is waiting for you to finish the input (because you haven't typed in the closing ' sign).
What command have you typed? Try Ctrl+C .
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When double-tab, the terminal shows a list of command candidates, but the cursor line also moves downwards. How to make it stay on the same line while showing all the candidates below?
I'm guessing there must be some config file that can specify this behavior. This also applies to the case when ctrl-c in the middle of typing a command. I'd like the cursor to stay on the current line.
You need shell with rich terminal support.
For example Z Shell. Bash build with readline library for user interaction and it operate only line-by-line...
This behavior allow to run Bash on most platform as does not require special abilities from terminal.