docs: More line-length fixes
This commit is contained in:
parent
f78cbf79fc
commit
4a7ce4f51c
@ -24,7 +24,8 @@ As a more comprehensive example, here's a commented excerpt of the completions f
|
||||
# Note that this can be undone by using "-F".
|
||||
#
|
||||
# File completions also need to be disabled
|
||||
# if you want to have more control over what files are offered (e.g. just directories, or just files ending in ".mp3").
|
||||
# if you want to have more control over what files are offered
|
||||
# (e.g. just directories, or just files ending in ".mp3").
|
||||
complete -c timedatectl -f
|
||||
|
||||
# This line offers the subcommands
|
||||
@ -42,22 +43,26 @@ As a more comprehensive example, here's a commented excerpt of the completions f
|
||||
# For more complex uses, you can write your own function.
|
||||
# See e.g. the git completions for an example.
|
||||
#
|
||||
complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "status set-time set-timezone list-timezones"
|
||||
complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" \
|
||||
-a "status set-time set-timezone list-timezones"
|
||||
|
||||
# If the "set-timezone" subcommand is used,
|
||||
# offer the output of `timedatectl list-timezones` as completions.
|
||||
# Each line of output is used as a separate candidate,
|
||||
# and anything after a tab is taken as the description.
|
||||
# It's often useful to transform command output with `string` into that form.
|
||||
complete -c timedatectl -n "__fish_seen_subcommand_from set-timezone" -a "(timedatectl list-timezones)"
|
||||
complete -c timedatectl -n "__fish_seen_subcommand_from set-timezone" \
|
||||
-a "(timedatectl list-timezones)"
|
||||
|
||||
# Completion candidates can also be described via `-d`,
|
||||
# which is useful if the description is constant.
|
||||
# Try to keep these short, because that means the user gets to see more at once.
|
||||
complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" -a "set-local-rtc" -d "Maintain RTC in local time"
|
||||
complete -c timedatectl -n "not __fish_seen_subcommand_from $commands" \
|
||||
-a "set-local-rtc" -d "Maintain RTC in local time"
|
||||
|
||||
# We can also limit options to certain subcommands by using conditions.
|
||||
complete -c timedatectl -n "__fish_seen_subcommand_from set-local-rtc" -l adjust-system-clock -d 'Synchronize system clock from the RTC'
|
||||
complete -c timedatectl -n "__fish_seen_subcommand_from set-local-rtc" \
|
||||
-l adjust-system-clock -d 'Synchronize system clock from the RTC'
|
||||
|
||||
# These are simple options that can be used everywhere.
|
||||
complete -c timedatectl -s h -l help -d 'Print a short help text and exit'
|
||||
|
@ -91,8 +91,10 @@ You can also use the Web configuration tool, :ref:`fish_config <cmd-fish_config>
|
||||
If you want to modify your existing prompt, you can use :ref:`funced <cmd-funced>` and :ref:`funcsave <cmd-funcsave>` like::
|
||||
|
||||
>_ funced fish_prompt
|
||||
# this opens up your editor (set in $EDITOR), modify the function, save the file, repeat to your liking
|
||||
# once you are happy with it:
|
||||
# This opens up your editor (set in $EDITOR).
|
||||
# Modify the function,
|
||||
# save the file and repeat to your liking.
|
||||
# Once you are happy with it:
|
||||
>_ funcsave fish_prompt
|
||||
|
||||
This also applies to :ref:`fish_right_prompt <cmd-fish_right_prompt>` and :ref:`fish_mode_prompt <cmd-fish_mode_prompt>`.
|
||||
@ -267,7 +269,8 @@ But it also means that these commands can stop working at any moment once a matc
|
||||
.. code-block:: sh
|
||||
|
||||
for f in ./*.mpg; do
|
||||
# We need to test if the file really exists because the wildcard might have failed to match.
|
||||
# We need to test if the file really exists because
|
||||
# the wildcard might have failed to match.
|
||||
test -f "$f" || continue
|
||||
mympgviewer "$f"
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user