[Bug 1989330] [NEW] ~/.ssh/folder broke bash completion

Poil 1989330 at bugs.launchpad.net
Mon Sep 12 09:26:12 UTC 2022


Public bug reported:

When trying to complete scp have this error :

```
+ tmpkh=($(awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u))
++ sort -u
++ awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' /etc/ssh/ssh_config /home/xxxx/.ssh/config /home/xxxx/.ssh/xxxx.ssh-config/ghost/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/local/config /home/xxxx/.ssh/local
awk: ligne de commande:1: avertissement : L'argument « /home/xxxx/.ssh/local » de la ligne de commande est un répertoire : ignoré
```

** Affects: bash-completion (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  When trying to complete scp have this error :
  
  ```
  + tmpkh=($(awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u))
  ++ sort -u
  ++ awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' /etc/ssh/ssh_config /home/xxxx/.ssh/config /home/xxxx/.ssh/xxxx.ssh-config/ghost/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/local/config /home/xxxx/.ssh/local
  awk: ligne de commande:1: avertissement : L'argument « /home/xxxx/.ssh/local » de la ligne de commande est un répertoire : ignoré
  ```
- 
- 
- Patching like that fix this bug :
- 
- ```
- 1674c1674
- <         [[ -r $configfile ]] && [[ -f $configfile ]] && config+=("$configfile")
- ---
- >         [[ -r $configfile ]] && config+=("$configfile")
- 
- ```

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1989330

Title:
  ~/.ssh/folder broke bash completion

Status in bash-completion package in Ubuntu:
  New

Bug description:
  When trying to complete scp have this error :

  ```
  + tmpkh=($(awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u))
  ++ sort -u
  ++ awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' /etc/ssh/ssh_config /home/xxxx/.ssh/config /home/xxxx/.ssh/xxxx.ssh-config/ghost/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/xxxx.ssh-config/team-xxxx/config /home/xxxx/.ssh/local/config /home/xxxx/.ssh/local
  awk: ligne de commande:1: avertissement : L'argument « /home/xxxx/.ssh/local » de la ligne de commande est un répertoire : ignoré
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1989330/+subscriptions




More information about the foundations-bugs mailing list