help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Functions in bash do not always show in speedbar.


From: goncholden
Subject: Re: Functions in bash do not always show in speedbar.
Date: Thu, 26 May 2022 11:17:20 +0000

I have included a fem examples of the misbehaving functions that do not show up 
in speedbar, so you can see what they look like.

Bash does allow functions to use a dash (-).  But this is not reflected in 
speedbar.

coreutils-rehash ()
 {
  local exec_rc=0
  case $1 in
   ("-V"|"--version")
       local -r etdate="V01 Jul 2021 Wk27"
       return 0
       ;;
   ("-h"|"--help")
       echo "Set aliases for utilities."
       return 0
       ;;
   ("-e"|"--exec") exec_rc=1 ; shift ;;
   # .................
   (*)
       echo "Invoke \`linge-cmd-util -h' for details."
  esac

  if (( exec_rc == 1 )); then

    # recursive listing of directories and files
    # list directories only with display depth `-L LEVEL`
    alias tdl='tree -d -L'

    # ---------------------------------------------------

    alias ld='ls -d */'  # list directories

    alias ll='ls -alF'
    alias la='ls -A'
    alias  l='ls -CF'
    alias lt='ls -lt'     # sort by date
    alias lx='ls -lXB'    # sort by extension

    alias la='ls -A'
    alias la='ls -aF'     # List all and file types
    alias ll='ls -alF'
    alias ll='ls -lF'     # List <dir> style

    alias  lr='ls -lR'    # recursive ls
    alias ltr='ls -ltr'   # sort by date recursively
    alias lcr='ls -lcr'   # sort by change time
    alias lur='ls -lur'   # sort by access time

    alias lsr='ls -lSr'   # sort by size

    # ---------------------------------------------------

    # remove each given file
    alias rmi='rm -i'    # prompt before every removal
    alias rmf='rm -f'    # ignore non-existent files, never prompt

    # view text files, `less' does not read entire file before display
    alias l='less'       # faster than `more' with backward movement
    alias m='more'       # reads entire file before display

  fi
 }

opcon-dirpaths ()
 {
  local exec_rc=0
  case $1 in
   ("-V"|"--version")
       local -r etdate="V01 Jul 2021 Wk27"
       return 0
       ;;
   ("-h"|"--help")
       echo "Set aliases for path locations.n"
       echo "  agenda: HOME/Agenda"
       echo "  gnupa:  HOME/ActiveJobs/Books/Infocs/Gnupa"
       echo "  tdr:    HOME/ActiveJobs/Reports/Tdr"
       return 0
       ;;
   # .................
   ("-e"|"--exec") exec_rc=1 ; shift ;;
   # .................
   (*)
       echo "Invoke \`linge-action -h' for details."
  esac # case ends here

  # --------------------------------

  # Set shortcuts to specific directories
  if (( exec_rc == 1 )); then
    alias agenda=${HOME}/Agenda
    alias gnupa=${HOME}/ActiveJobs/Books/Infocs/Gnupa
    alias tdr=${HOME}/ActiveJobs/Reports/Tdr
    alias tdrdev=${HOME}/05-Development
    alias hagbard='echo agenda gnupa tdrdev'
  fi
 }



------- Original Message -------
On Monday, February 7th, 2022 at 4:22 PM, Kevin Vigouroux via Users list for 
the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:


> Stefan Monnier via Users list for the GNU Emacs text editor
> help-gnu-emacs@gnu.org writes:
>
> > goncholden via Users list for the GNU Emacs text editor [2022-02-07 
> > 02:37:23] wrote:
> >
> > > Have noticed that functions in bash do not always show in speedbar. Is 
> > > there some setup I can do
> > > for them to show up?
>
>
> Note that `speedbar-supported-extension-expressions' may not match the
> “.sh” extension.
>
> > M-x report-emacs-bug RET
> >
> > and give enough details for someone else to reproduce the problem?
> > I strongly suspect that you can reduce the problem to:
> >
> > emacs -q .../my/foo.sh
> > M-x imenu TAB
> >
> > where the completions given after this TAB don't include some of the
> > functions you have in that `foo.sh`.
>
>
> #+begin_quote
> When you change the contents of a buffer, if you add or delete
> definitions, you can update the buffer’s index based on the new contents
> by invoking the ‘Rescan’ item in the menu. Rescanning happens
> automatically if you set ‘imenu-auto-rescan’ to a non-‘nil’ value.
> There is no need to rescan because of small changes in the text.
> #+end_quote
>
> > So trim the file down to just those functions and included it in your
> > bug report, so we can see what they look like.
> >
> > Stefan
>
> --
> Kevin Vigouroux
> Best regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]