All Questions
Tagged with bash-completion linux
21 questions
0
votes
1
answer
191
views
How to write array elements to a file one per each line in shell? [duplicate]
I have an array in arr which contains list of strings - (string1 string2 string3 ...)
How do I append these elements to a text file one element per line.
The elements could be of any data type. But I ...
-1
votes
3
answers
274
views
Non variable recognition on Syspass API Bash Script
When i input a variable on the curl with the json indexed, it takes the string value of the variable, if i scaped the double-quotes, it returns me a sintax error because of in a json request u have to ...
-1
votes
1
answer
194
views
Bash: How to find a specific char in a string
I have the assignment to write a bash script to validate password strength and one of the requirements is:
Include both the small and capital case letters.
The Password variable is the input, of ...
0
votes
1
answer
222
views
I want to input variable like string bash
I want input file like -
a="Hello"
echo "$a ${foobar}"
Output i get is -
Hello
But i want output like this -
Hello ${foobar}
How can i accomplish this is bash script?
9
votes
2
answers
9k
views
Human friendly bash auto-completion with sudo
My system is Manjaro Linux based on Arch Linux, I use bash and bash-completion.
It works perfectly when I type something as regular user (no sudo)
$ rfkill <TAB><TAB>
block event ...
3
votes
2
answers
271
views
How to show only first level subdir in bash auto-completion?
I have this bash completion file
#/etc/bash_completion.d/mycommand
_mycommand()
{
local cur
COMPREPLY=()
_init_completion || return
#Variable to hold the current word
cur="${...
0
votes
1
answer
335
views
How to autocomplete the options for a command in SLES 12?
I have a service, say xyz. As of now, I can start, stop or restart that service using the command rcxyz start, rcxyz stop and rcxyz restart respectively. It is working fine.
All that I want to do is, ...
-1
votes
1
answer
287
views
How to enable bash-completion xrdp lxde
It maybe evident for many people but for me wasn't.
So to enable bash-completion or in other words auto-completion or auto-fill in Linuks OS, Debian or Kali or Ubuntu combine with xlde Desktop ...
4
votes
2
answers
200
views
Bash completion sometimes meshes up my terminal when the completion function reads a file
So I've been having a problem with some cli programs. Sometimes when I kill the running process with Ctrl+C, it leaves the terminal in a weird state (e.g. echo is turned off). Now that is to be ...
-4
votes
2
answers
2k
views
How to run a bash script via absolute path? [closed]
I've already posted this question here:
https://superuser.com/questions/1067609/how-to-run-a-bash-script-via-absolute-path
But I hope that maybe If I duplicate it here, I will get my answer sooner :)...
7
votes
1
answer
1k
views
How to extend bash-completion with the already exist completion in another file?
For example, there is bash-completion for rar on linux, I want to extend, make more completions for the same command - rar, maybe for my own filename extension, but I don't want to touch the already ...
0
votes
2
answers
2k
views
How to add in bash for auto completion of arcanist commands
I am new to linux.
I am trying to set up arcanist.
I am done with git clone and adding the path in environment variable, however I am confused on how to set up the tab completion for arcanist ...
3
votes
1
answer
855
views
How to pass subcommand back into bash completion?
I've written a command which could be compared to time or timeout in that it's used at the start of the line as a prefix to any other bash command. My question is, how do I convince my bash completion ...
11
votes
3
answers
19k
views
Bash will not auto-complete (Tab) with files
Auto-completion in bash (with Tab) works on folders, but not with files.
I'm running Ubuntu 13.10
I haven't touched my .bashrc file
This is how the bottom part of the .bashrc file looks, with the bash-...
0
votes
2
answers
608
views
Strange autocompletion behavior in bash (Linux) using PATH variable with special symbol - apostroph (')
Well...I'm so confused, cause the only real problem in my case is freaking apostrophe (').
Situation: expanding PATH variable influence word completion, based on whether was apostrophes in additional ...