I am using Bash's Tab autocompletion quite often, but when I'm inside a Bash command substitution structure like in the example below, it breaks and only returns an error.  Let's assume I want to find out the file type of the apt-get executable, the command for that could be file $(which apt-get). Now if I enter that up to the letter "g" and then press Tab, I see this:  file $(which apt-gbash: unexpected EOF while looking for matching `)' bash: syntax error: unexpected end of file   Is there any way how I can fix this and use tab autocompletion inside Bash structures like command substitution as well?
I'm trying to go into an irb session with specific environment variables from a file with this command:  $ env $(cat env.sh) irb   But when I try press Tab after I type env. to complete it, I get this following error:  $ env $(cat env.-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file   Another interesting thing is that if I'm logged in as root, this error does not occur.   Here's the output of find ~ -uid 0:  $ find ~ -uid 0 /home/(redacted)/.rpmdb /home/(redacted)/.rpmdb/Group /home/(redacted)/.rpmdb/Conflictname /home/(redacted)/.rpmdb/Installtid /home/(redacted)/.rpmdb/Sha1header /home/(redacted)/.rpmdb/Providename /home/(redacted)/.rpmdb/__db.002 /home/(redacted)/.rpmdb/Requirename /home/(redacted)/.rpmdb/Sigmd5 /home/(redacted)/.rpmdb/__db.001 /home/(redacted)/.rpmdb/Obsoletename /home/(redacted)/.rpmdb/.dbenv.lock /home/(redacted)/.rpmdb/Name /home/(redacted)/.rpmdb/Basenames /home/(redacted)/.rpmdb/Triggername /home/(redacted)/.rpmdb/Packages /home/(redacted)/.rpmdb/Dirnames /home/(redacted)/.rpmdb/__db.003   Can anyone explain to me why this is happening and if so, how do I fix it in when I'm not a root user?
Finding value of $S-T$ in $2$ binomial sum. If $\displaystyle S=\sum^{n}_{k=0}(-1)^k\frac{1}{k+m+1}\binom{n}{k}$ and f $\displaystyle T=\sum^{m}_{k=0}(-1)^k\frac{1}{k+n+1}\binom{m}{k}$.Then $S-T$ is   Try:$$S=\sum^{n}_{k=0}(-1)^k\int^{1}_{0}x^{k+n}\binom{n}{k}dx=\int^{1}_{0}x^n\sum^{n}_{k=0}(-x)^k\binom{n}{k}dx$$  Could some help me, thanks How to calculate $\lim_{n\to\infty}(1+1/n^2)(1+2/n^2)\cdots(1+n/n^2)$? Computing the Galois group of polynomials $x^n-a \in \mathbb{Q}[x]$ $ d = \gcd(a,b)\Rightarrow\ \gcd(a/d,b/d) = 1$ Resizing Mac OS partition - macOS High Sierra Headphone jack not working? I was just looking at the statistics for migrated questions in the  mod tools, and noticed this oddity:    The actual statistics, as visible to any 10k+ SFF user , are: 6 migrated to Worldbuilding, 2 to Literature, 2 to SFF meta, 1 to Movies &amp; TV, 1 to Writers, and 1 to Aviation.  Why is one of the meta migrations showing up with a blank icon rather than with the other?  Both migrated questions were closed as duplicates on meta. Both were migrated by 5 community members without mod involvement. One of the stubs on main has since been deleted, but so have the stubs for some of the other migrated questions. I can't think of anything to explain this discrepancy. Compact topological space with closed graph implies continuity Let $X,Y$ be topological spaces and $f:X \rightarrow Y$  If $Y$ is compact and $G(f)$ (graph of $f$) is closed, show that $f$ is continuous.   I consider an open set in $X$, and as $G(f)$ is closed, $(X \times Y)-G(f)$ is open. And I guess I need to do something here. Then I can get some open sets. Also, I notice that compact is something relate to "finite". I guess I can use the compactness to do finite intersection or union and get the result finally.  But what should I do in the middle or I am not even on a right track. When I cut a layer using marquee tool, I get blur edges to cut side. How do I get sharp edges after cut? I am using rectangular marquee tool to cut a portion of the layer in photoshop cs5, but after cutting, the edges are not sharp, I get blur edges.      how can I get sharp edges? iOS 7 Weather app expand/collapse transition Java process memory check test Hat duplicates when info is expanded It seems like there is a bug that is causing a duplicate hat to appear when I expand info, like pressing &quot;(more)&quot; on a suggested edit. This bug does not seem to be specific to the suggested edits review queue though, as others have reported seeing this bug in other places, like code snippet expansion. Steps to repro:  Put on a hat. Navigate to one of your own suggested edits. (You can just also open the Suggested Edits review queue and go to a random suggestion, but there is no guarantee any of those users will be wearing a hat.) Click the &quot;(more)&quot; button to expand the top box.  What should happen: Hat should shift down with the rest of the content. What happens: All the content shifts down, but a duplicate hat remains in the initial place. Before expansion:  After expansion with duplicate hat: How to get the last argument to a /bin/sh function What's a better way to implement print_last_arg?  #!/bin/sh  print_last_arg () {     eval "echo \${$#}"  # this hurts }  print_last_arg foo bar baz # baz   (If this were, say, #!/usr/bin/zsh instead of #!/bin/sh I'd know what to do.  My problem is finding a reasonable way to implement this for #!/bin/sh.)  EDIT: The above is only a silly example.  My goal is not to print the last argument, but rather to have a way to refer to the last argument within a shell function.    EDIT2: I apologize for such an unclearly worded question.  I hope to get it right this time.  If this were /bin/zsh instead of /bin/sh, I could write something like this  #!/bin/zsh  print_last_arg () {     local last_arg=$argv[$#]     echo $last_arg }   The expression $argv[$#] is an example of what I described in my first EDIT as a way to refer to the last argument within a shell function.  Therefore, I really should have written my original example like this:  print_last_arg () {     local last_arg=$(eval "echo \${$#}")   # but this hurts even more     echo $last_arg }   ...to make it clear that what I'm after is a less awful thing to put to the right of the assignment.  Note, however, that in all the examples, the last argument is accessed non-destructively.  IOW, the accessing of the last argument leaves the positional arguments as a whole unaffected. Multiplication in Permutation Groups Written in Cyclic Notation Evaluating a sequence of complex numbers: $|z_n - z_m| < \frac1{1+ |n-m|}$ Let $\{z_n\}$ be sequence of complex numbers such that   $$ |z_n - z_m| &lt; \frac{1}{1+ |n-m|} $$ for all $n,m$  Given this information, can we compute $\lim_{n \to \infty} z_n $?  Attempt:  For sure the sequence is bounded since the RHS is always $\leq 1 $. IF $z_m = 0$, then we have   $$ |z_n | &lt; 1 $$ for all $n$. I claim that the limit is $1$. How can I prove this ? We are provided with a string A (may contain repeated characters as well ). One needs to make all possible permutations of A , and find out how many pairs of strings chosen from these permutations are not similar.  Two strings are similar if we can make both of them exactly same by carrying out at most 1 swap in each of them .  Example :- if we are provided with string abcd  , then for permutation abcd , the permutations which are not similar to it are bcda , bdac , cadb , cdba , dabc , dcab . Similar is the case for other permuations as well. So overall number of desired pairs are 24*6=144 .  I tried solving it for each possible pair by approach mentioned here     But as the permutations can be large enough , I need a better approach of solving this. Suppose that $(s_n)$ converges to s. Prove that $(s_n^2)$ converges to $s^2$ I am really struggling with my proofs class, I don't really understand how to prove a statement like this, or what the epsilon is standing for..  Suppose that $(s_n)$ converges to s.  Prove that $(s_n^2)$ converges to $s^2$ directly without using the fact that $lim(s_nt_n)=st$  Suppose that $(s_n)$ converges to s. Then, since $(s_n)$ is convergent, there exists an $M_1$ such that $|S_n|&lt;M_1$, for all $n\in \!\,\mathbb{N} \!\,$. Let $M=M_1+|S|$ (I don't completely understand this step...). Then given $ε&gt;0$, there exists N such that n>N implies that $|s_n-s|&lt;ε/M$. Thus for n>N, we have $|s_n^2-s^2|=|s_n-s|*|s_n+s|&lt;(ε/M)(M)=ε$. Hence, $s_n^2$ converges to $s^2$. What's the difference between term_id and term_taxonomy_id Making a WinForms TextBox behave like your browser's address bar When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar.  To see what I mean, click in your web browser's address bar. You'll notice the following behavior:    Clicking in the textbox should select all the text if the textbox wasn't previously focused. Mouse down and drag in the textbox should select only the text I've highlighted with the mouse. If the textbox is already focused, clicking does not select all text. Focusing the textbox programmatically or via keyboard tabbing should select all text.   I want to do exactly this in WinForms.  FASTEST GUN ALERT: please read the following before answering! Thanks guys. :-)     Calling .SelectAll() during   the .Enter or .GotFocus events won't   work because if the user clicked the   textbox, the caret will be placed   where he clicked, thus deselecting all   text.      Calling .SelectAll() during the .Click event won't work because the user won't be able to select any text with the mouse; the .SelectAll() call will keep overwriting the user's text selection.      Calling BeginInvoke((Action)textbox.SelectAll) on focus/enter event enter doesn't work because it breaks rule #2 above, it will keep overriding the user's selection on focus. When I open the game, the screen stays at the Mojang sign and then crashes. It has something to do with my texture pack, but I can't start the game to change it and it won't let me delete the texture pack folder alone.  I've already deleted the bin and resources folders in the minecraft folder and downloaded the game again. I opened it but the same problem was still there.  How do I properly perform a clean uninstall of the game?